I want to get <a>
element of html. I use xPath /html/body/nav/div/a
but not correct. Someone know how I get the Example text
?
<nav class="navbar navbar-expand-xl" id="menu">
<div>
<a>
<i class="fas fa-user mr-2"></i>
Example text
</a>
</div>
2
Answers
Your code should look like this :
Here is the parse coding:
You can parse it via DOM or use XPath.
Here is an example of each.
Demo: https://3v4l.org/nvcYP