Raj,
The first thing that I could tell you is that your XML
schema is
your only problem. The way you have the data formatted now
violates the
entire principal behind the XML syntactical structure.
Trying something
akin to the following...
---
<?xml version="1.0"
encoding="utf-8" ?>
<ThematicStudies>
<Study ID="1" Code="INSPSTUDY1"
Title="Some title.">
<Question ID="1"
Grade="1">
<Inquiry>What is the answer to my first
question?</Inquiry>
<Response>The answer is clear,
grass-hopper.</Response>
</Question>
<Question ID="2"
Grade="1">
<Inquiry>What is the answer to my second
question?</Inquiry>
<Response>The answer is not so clear,
grass-hopper.</Response>
</Question>
</Study>
</ThematicStudies>
---
... you would be able to have much more control over your
data. Getting
the responses at that point would be as simple as:
---
xdoc.SelectNodes("ThematicStudies/Study[ ID="1"]/Question/Response/text()");
---
I hope that helps you out. As far as answering your exact
question, I
can say that a.) it's bad practice, and b.) it's not
feasible since the
node wild-carding in XPath only supports the full node's
name.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharp googlegroups.com
To unsubscribe from this group, send email to
C_Sharp-unsubscribe googlegroups.com
For more options, visit this group at http://groups.
google.com/group/C_Sharp
-~----------~----~----~----~------~----~------~--~---
|