Hello,
I'm running into an issue when using the translate function on an xpath query. Basically, my xpath statement is only catching elements when they are the first child of a node if i use the translate function
So if this is my xml
this xpath gives me files with id 1,2,3,4
but this xpath only gives me files with id 1,2,4
I'm assuming the problem is with how I'm calling the first translate function with a parameter of "tag/@text" but I don't see a different way of ordering the data that doesn't throw an invalid token error.
Has anyone done this type of child dependent case insensitive xpath statement before?
MCSD, VB.Net <%_%>
I'm running into an issue when using the translate function on an xpath query. Basically, my xpath statement is only catching elements when they are the first child of a node if i use the translate function
So if this is my xml
Code:
<files>
<file id="1">
<tag type="General" text="SAM"/>
</file>
<file id="2">
<tag type="General" text="SAM"/>
<tag type="General" text="SALLY"/>
</file>
<file id="3">
<tag type="General" text="SALLY"/>
<tag type="General" text="SAM"/>
</file>
<file id="4">
<tag type="General" text="SAM"/>
</file>
this xpath gives me files with id 1,2,3,4
Code:
/files/file[tag/@text='SAM']
Code:
/files/file[translate(tag/@text,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')=translate('SAM','ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')]
I'm assuming the problem is with how I'm calling the first translate function with a parameter of "tag/@text" but I don't see a different way of ordering the data that doesn't throw an invalid token error.
Has anyone done this type of child dependent case insensitive xpath statement before?
MCSD, VB.Net <%_%>