xml - How to get the value of a node using for each and if in xpath -
I am new to xpath .. I want to remove all the values of the age which use more than 24 Does the position in xslt
& gt; Price bookings & gt; & Lt; Guest & gt; & Lt; GuestCount Age = "24" code = "10" Qty = "1" /> & Lt; GuestCount Age = "26" code = "10" Qty = "1" /> & Lt; GuestCount Age = "3" code = "10" Qty = "1" /> & Lt; / Guest & gt; & Lt; / PriceBooking & gt;
So far I have tried with: -
& Lt; / Age & gt; & Lt; / XSL: When & gt; & Lt; XSL: otherwise & gt; & Lt; Sid & gt; Failed to load & lt; / Sid & gt; & Lt; / XSL: otherwise & gt; & Lt; / XSL: Select & gt;
This is always in condition otherwise .. please help with xpath
OK, you need to understand that the for each
converts the reference node into a guest
element and that's how you relate Paths are required such as
& lt; Xsl: when test = "guestlook / @ age and gt; 28" & gt; ... & lt; / Xsl: When & gt;
But the sample you posted has @ edge
values of 24, 26, and 3, so the situation is never true.
Comments
Post a Comment