Hi
I have an XML like the one below:
<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
<Destinations>
<Destination name="DEST1" >
<From>AMA*</From>
</Destination>
<Destination name="DEST2" >
<From>AMAZON</From>
</Destination>
<Destination name="DEST3" >
<From>EBAY</From>
</Destination>
<Destination name="DEST4" >
<From>*</From>
</Destination>
</Destinations>
</Configuration>
I want to query and find out all desintations that match a provided input.
If i specify EBAY i want the xpath to return the node name = DEST3 and DEST4 (which doesn't care about the value) but if i specify AMAZON it needs to return DEST1, DEST2 and DEST4 as AMA* in DEST1 supports wild card character.
so far my XPath looks like this:
/Destination[(From = '' or From = '*' ) )]/@name
If input is specified i create the XPATH expressions dynamically and slot the incoming value in the field
I have other elements in my XML besides From.
Appreciate if anyone could give pointers on this.
Thanks, Manglu