Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 20, 2012 03:00 AM by kuber.manral
0 Points
13 Posts
Feb 17, 2012 02:55 PM|LINK
I get an XPathException : "namespace" has an invalid token.
I have the following XML:
<ArrayOfResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Blah.Blah"> <Response> <Number>396</Number> <ID>33</ID> <UID>1</UID> <VariableName>Comments</VariableName> </Response> <Response> <Number>396</Number> <ID>33</ID> <UID>1</UID> <VariableName>Comments</VariableName> </Response> <Response> <Number>396</Number> <ID>33</ID> <UID>1</UID> <VariableName>Comments</VariableName> </Response> </ArrayOfResponse>
If I don't have the namespace in the root node it works just fine. But with the namespace it doesn't work. How can i get this XPath query to work?
All-Star
118619 Points
18779 Posts
Feb 19, 2012 01:32 AM|LINK
So what do you want to do now?
Contributor
3051 Points
714 Posts
Feb 20, 2012 03:00 AM|LINK
Hi tripower,
May i get to know why you have put namespaces there in "ArrayOfResponse" Node ? Any Specific reason to put them over there ?
tripower
0 Points
13 Posts
XPath query exception with Root node and namespace
Feb 17, 2012 02:55 PM|LINK
I get an XPathException : "namespace" has an invalid token.
I have the following XML:
<ArrayOfResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Blah.Blah">
<Response>
<Number>396</Number>
<ID>33</ID>
<UID>1</UID>
<VariableName>Comments</VariableName>
</Response>
<Response>
<Number>396</Number>
<ID>33</ID>
<UID>1</UID>
<VariableName>Comments</VariableName>
</Response>
<Response>
<Number>396</Number>
<ID>33</ID>
<UID>1</UID>
<VariableName>Comments</VariableName>
</Response>
</ArrayOfResponse>
If I don't have the namespace in the root node it works just fine. But with the namespace it doesn't work. How can i get this XPath query to work?
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: XPath query exception with Root node and namespace
Feb 19, 2012 01:32 AM|LINK
So what do you want to do now?
kuber.manral
Contributor
3051 Points
714 Posts
Re: XPath query exception with Root node and namespace
Feb 20, 2012 03:00 AM|LINK
Hi tripower,
May i get to know why you have put namespaces there in "ArrayOfResponse" Node ? Any Specific reason to put them over there ?
Visit My Blog