Hi,
Ex: I have this xml:
<one>
<example>
<two>Hi</two>
</example>
<example>
<two>Martin</two>
</example>
</one>
evaluateXPathAsString(link, "one/example") return "Hi".
But if I wanted to refer to second <example> (Martin)?
evaluateXPathAsString
Moderator: Martin
Re: evaluateXPathAsString
Hi,
You can refer to elements like this:
evaluateXPathAsString(link, "one/example[1]"); returns "Hi"
evaluateXPathAsString(link, "one/example[2]"); returns "Martin"
Here's an XPath tutorial with some more examples: XPath Tutorial.
Please note that Automagic supports only XPaths expressions returning a simple string but no node-sets.
Regards,
Martin
You can refer to elements like this:
evaluateXPathAsString(link, "one/example[1]"); returns "Hi"
evaluateXPathAsString(link, "one/example[2]"); returns "Martin"
Here's an XPath tutorial with some more examples: XPath Tutorial.
Please note that Automagic supports only XPaths expressions returning a simple string but no node-sets.
Regards,
Martin