June 25, 200322 yr 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!
August 1, 200322 yr 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.
Create an account or sign in to comment