On Fri, Nov 16, 2012 at 4:22 PM, Patrick Whittingham
<[email protected]> wrote:
> Can I use $services.xml to parse a XML document to get the tag name and
> value?
>
> #set( $xml = "<test><input1>eeee</input1></test>");
>

> I would like the input value "eeee". How can this be done?

$services.xml.parse('<test><input1>eeee</input1></test>').getElementsByTagName('input1').item(0).getFirstChild().getNodeValue()

You can always print $someVariable.class.name to check the type of the
variable value and then search for its Javadoc on the web.

Hope this helps,
Marius

>
> Thanks,
> Patrick
>
>
>
>
> --
> View this message in context: 
> http://xwiki.475771.n2.nabble.com/question-about-xml-tp7582405.html
> Sent from the XWiki- Dev mailing list archive at Nabble.com.
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to