jazzIIIlove
asked on
simple xml parse with xpath and populate a dropdown list
Hi there;
I have the following xml:
I need to do in XPath of C#.
I used this XPath but failed simply node is not found.
"/Envelope/Body/Aresponse/ Mys/My/pri merId"
Give a hand?
Regards.
I have the following xml:
<Envelope>
<Body>
<Aresponse>
<Mys>
<My>
<primerId>3</primerid>
<secondaryId>5</secondaryId>
</My>
<My>
<primerId>4</primerid>
<secondaryId>6</secondaryId>
<Mys>
....
I need to do in XPath of C#.
I used this XPath but failed simply node is not found.
"/Envelope/Body/Aresponse/
Give a hand?
Regards.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
Envelope is the root and my xml content doesn't start with <?xml version='1.0'?>
This is the simplied version of my xml. No way with XPath?
Regards.
Envelope is the root and my xml content doesn't start with <?xml version='1.0'?>
This is the simplied version of my xml. No way with XPath?
Regards.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
<primerId>3</primerid> was a typo but my xml is a soap message actually which starts with Envelope.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Also make sure you use selectNodes, not selectSingleNode,
it seems you can have more than one result node
it seems you can have more than one result node
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks guys. Working now. I felt the spirit of old EE here
ASKER
Geert. Extremely precise guessing
"//Envelope/Body/Aresponse