How to return all matched nodes?

40 views
Skip to first unread message

Gleki Arxokuna

unread,
Jul 19, 2014, 12:24:14 PM7/19/14
to libx...@googlegroups.com
I'm trying to use "x = xmlDoc.get("/somenode")" but "x.text()" returns the text of only the first matched node although using xpath's "count" function I can see that there are more matches.

How to return the rest of them?

Marco Rogers

unread,
Jul 19, 2014, 1:35:53 PM7/19/14
to libx...@googlegroups.com
Use xmlDoc.find() to get an array of results. get() only returns the first one.

Sent from my iPad

On Jul 19, 2014, at 9:24 AM, Gleki Arxokuna <gleki.is...@gmail.com> wrote:

I'm trying to use "x = xmlDoc.get("/somenode")" but "x.text()" returns the text of only the first matched node although using xpath's "count" function I can see that there are more matches.

How to return the rest of them?

--
You received this message because you are subscribed to the Google Groups "libxmljs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to libxmljs+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages