I would like to query this xml below:-
If i use :-
nodeList = root.SelectNodes("/Voter/Question/Answer/Answer/text()")
I get to see "Male" but only if i remove the root tags:-
<NSurveyVoter xmlns="http://www.nsurvey.org/NSurveyVoter.xsd">
</NSurveyVoter>
But what i want to get to see as the output is to see
"What is your Gender?" and the "Male"
that means the question and the answer
which is the :- <QuestionText>What is your Gender?</QuestionText>
and the <Answer>Male</Answer>
Any ideas
Tahnks
<?xml version="1.0" encoding="utf-8" ?>
<NSurveyVoter xmlns="http://pop.com.xsd">
<Voter>
<VoterID>649</VoterID>
<SurveyID>13</SurveyID>
<VoteDate>2005-09-29T12:38:12.9700000+10:00</VoteDate>
<StartDate>2005-09-29T12:33:55.5330000+10:00</StartDate>
<IPSource>192.168.100.77</IPSource>
<Question>
<QuestionText>What is your Gender?</QuestionText>
<VoterID>649</VoterID>
<QuestionId>516</QuestionId>
<Answer>
<AnswerID>1802</AnswerID>
<Answer>Male</Answer>
<VoterId>649</VoterId>
<QuestionId>516</QuestionId>
<SectionNumber>0</SectionNumber>
</Answer>
</Question>
</voter>
</NSurveyVoter>
*** Sent via Developersdex http://www.developersdex.com ***