Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

how do i read a certain node from xml


This topic is 7739 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

i have an xml that i read the item tage every time

in the end o the exml i have an <errorCode> tage ! how can i check that's it's there and read it's value? (i dont get that errorCode always but in certain condition's which i dont control!) :

<item xsi:type="ns2:DRSpecData">

<DRType xsi:type="xsd:string"></DRType>

<fax xsi:type="xsd:string"> 04-6560111</fax>

<FName xsi:type="xsd:string"> &#1488;&#1489;&#1512;&#1492;&#1501;</FName>

<plcType xsi:type="xsd:string">&#1495;</plcType>

<licID xsi:type="xsd:string">14335</licID>

&#1506;&#1510;&#1502;&#1493;&#1503;</streetName>

<plcNo xsi:type="xsd:string">1356</plcNo>

<zip xsi:type="xsd:string"></zip>

<phone2 xsi:type="xsd:string"></phone2>

<phone1 xsi:type="xsd:string"> 04-6570030</phone1>

</item>

</DRSpecDataArray><errorCode xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xsi:type="xsd:string">8</errorCode></ROOT>

- thanks in advance peleg!

  • 1 month later...
Posted

Sure!

<xsl:value-of select="/ROOT/errorCode" /> will give you the value "8" in your example.

If you don't have the element, then no value (empty) will be returned.

  • 1 month later...

This topic is 7739 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.