13 years ago
XQuery Match - Multiple results handling
Hello,
I'm having some trouble with an XQuery match I'm writing against some troublesome XML and was hoping someone had any ideas.
Here is an example of the XML:
<Header>
<Content>
<Errors>
<Errors>A</Errors>
<Errors>B</Errors>
<Errors>C</Errors>
</Errors>
</Content>
</Header>
And here are some of my XQuery strings:
//Errors[1]
//Errors[2]
//Errors[3]
Problem:
The second and third XQuery work properly, however the first string //Errors[1] returns "More than one match in the current response".
I know the XML is not ideal, but I don't have the power to change it. Is there any way I can properly handle the first case successfully?
Any help is greatly appreciated, thank you!
I'm having some trouble with an XQuery match I'm writing against some troublesome XML and was hoping someone had any ideas.
Here is an example of the XML:
<Header>
<Content>
<Errors>
<Errors>A</Errors>
<Errors>B</Errors>
<Errors>C</Errors>
</Errors>
</Content>
</Header>
And here are some of my XQuery strings:
//Errors[1]
//Errors[2]
//Errors[3]
Problem:
The second and third XQuery work properly, however the first string //Errors[1] returns "More than one match in the current response".
I know the XML is not ideal, but I don't have the power to change it. Is there any way I can properly handle the first case successfully?
Any help is greatly appreciated, thank you!