Amar wrote:
I have XML Data:
<REQUEST>
<PARAMETERS>
<PPM Name="CCCS Filed Date" value="xxxx"></PPM>
</PARAMETERS>
<RECORD _FiledDate="12/15/2003"></RECORD>
</REQUEST>
I want to get data from @value {"xxxx"} if exist, otherwise get value
from @_FiledDate.
With XPath 2.0 you can do
if (/REQUEST/PARAMETERS/PPM/@value) then
/REQUEST/PARAMETERS/PPM/@value else /REQUEST/RECORD/@_FiledDate
With XPath 1.0 (and 2.0 of course) you can do
/REQUEST/PARAMETERS/PPM[@value]/@value |
/REQUEST[PARAMETERS/PPM[not(@value)]]/RECORD/@_FiledDate
--
Martin Honnen
http://JavaScript.FAQTs.com/