- Wed May 04, 2016 12:29 am
#785326
I'm trying to parse the returning XML from a REST call to Openbravo and struggling.
If I wanted to pull out say <active> status from the response and assign to a variable, how would I parse the XML?
Thanks in advance!!
XML response except is as follows:
<ob:Openbravo xmlns:ob="http://www.openbravo.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Country id="106" identifier="Spain">
<id>106</id>
<client id="0" entity-name="ADClient" identifier="System"/>
<organization id="0" entity-name="Organization" identifier="*"/>
<active>true</active>
<creationDate transient="true">2011-02-22T17:06:39.0Z</creationDate>
<createdBy transient="true" id="0" entity-name="ADUser" identifier="System"/>
<updated transient="true">2011-02-22T17:06:39.0Z</updated>
<updatedBy transient="true" id="0" entity-name="ADUser" identifier="System"/>
<name>Spain</name>
If I wanted to pull out say <active> status from the response and assign to a variable, how would I parse the XML?
Thanks in advance!!
XML response except is as follows:
<ob:Openbravo xmlns:ob="http://www.openbravo.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Country id="106" identifier="Spain">
<id>106</id>
<client id="0" entity-name="ADClient" identifier="System"/>
<organization id="0" entity-name="Organization" identifier="*"/>
<active>true</active>
<creationDate transient="true">2011-02-22T17:06:39.0Z</creationDate>
<createdBy transient="true" id="0" entity-name="ADUser" identifier="System"/>
<updated transient="true">2011-02-22T17:06:39.0Z</updated>
<updatedBy transient="true" id="0" entity-name="ADUser" identifier="System"/>
<name>Spain</name>