J
J
JRazor2014-02-10 22:39:24
HTML
JRazor, 2014-02-10 22:39:24

XPath: get text

Hello.
There was a problem with XPath - you need to get all the text inside :
<ul>
<li>
"Feb"
<h3>12</h3>
"2014"
</li>
</ul>
If you use "//*ul/li/text ()", then we get only Feb and 2014. How to get three values?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Artyom, 2014-02-10
@JRazor

Try:
ul/li/descendant::text()

R
Rowdy Ro, 2014-02-11
@rowdyro

/ul/li|ul/li/h3
gets 2 values:
Feb 2014
12

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question