Answer the question
In order to leave comments, you need to log in
XPath query with no children?
<div class="some-class">
<div>
<span>Возраст</span>
"24"
<span>лет</span>
</div>
</div>
"//div[contains(@class, 'some-class')]/div"
contains (string) "Age 24". <span>
Answer the question
In order to leave comments, you need to log in
If the html structure is the same, then this option will work
But such an option
will select all text elements, excluding spaces. In your particular case, item(0)->nodeValue will have a value between two spans. If you need all the text element inside the div, then just foreach through the results.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question