pelegk Posted June 25, 2003 Posted June 25, 2003 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"> אברהם</FName> <plcType xsi:type="xsd:string">ח</plcType> <licID xsi:type="xsd:string">14335</licID> עצמון</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!
beverly Posted August 1, 2003 Posted August 1, 2003 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now