Alright, here's a good example of the XML...
<searchable_xml>
<unit filename="firstunit.xml">
<sections>
<section category="A">
<paragraph dbidx="10">just some text that will be
searchable</paragraph>
<paragraph dbidx="11">more text that will be
searchable</paragraph>
<bullet dbidx="12">part of a searchable bulleted
list</bullet>
<bullet dbidx="13">more of a searchable bulleted
list</bullet>
</section>
<section category="B">
[...more <paragraph/> and <bullet/> elements
</section>
</sections>
<areas>
<area category="Q" subcategory="Q2">
[...more <paragraph/> and <bullet/> elements
</area>
<area category="R" subcategory="R2">
[...more <paragraph/> and <bullet/> elements
</area>
</areas>
</unit>
<unit filename="secondunit.xml">
<sections>
<section category="C">
[...more <paragraph/> and <bullet/> elements
</section>
<section category="D">
[...more <paragraph/> and <bullet/> elements
</section>
</sections>
<areas>
<area category="Q" subcategory="Q2">
[...more <paragraph/> and <bullet/> elements
</area>
<area category="R" subcategory="R2">
[...more <paragraph/> and <bullet/> elements
</area>
</areas>
</unit>
</searchable_xml>
My goal, after having constructed this "master" XML document within the
XmlDataDocument, is to bind it to a Web Control (not sure which one is the
most appropriate yet) with one or a series of XPath queries applied, so that
I can display a list of the <unit>, <sections>, and <areas> elements where
either the <paragraph> or <bullet> elements contain my search phrase. The
reason for this is that I have a "display_unit.aspx" page that parses via
XSL the <sections> or <areas> of the <unit> depending on what arguments are
passed into the page.
I've generated a schema using VS, but am getting a "Duplicated declaration
'paragraph'" and/or a "Duplicated declaration 'bullet'" error when I try to
read the schema into the XmlDataDocument.DataSet. I was thinking that maybe
the problem was that I needed to load a schema to make the DataSet
understand the XML. But, before I can successfully do this, I think I will
have to manually rewrite the schema to use namespaces.
I'll try what you have recommended without reading the schema. How would I
bind a seperately declared DataSet to the XmlDataDocument?