Thanks Oleg, I'm looking into it now.
Also, I liked your Extreme XML article on MSDN. Nice to see that authors are
"Oleg Tkachenko" <oleg@NO_SPAM_PLEASEtkachenko.com> wrote in message
news:#YmdxkZWDHA.1480@tk2msftngp13.phx.gbl...
> Cy Huckaba wrote:
>
> > I have an XML document that is linked to other document and I can't
> > figure out what the best way to try and merge them before query qith an
> > XpathNavigator.
> >
> > Simple example...a root xml document contains the root folder that can
> > contain items and other folders. The other folders can either live in
> > the root document or be in other xml files completely (to make it easier
> > for multiple developers/processes to work on the data at the same time.)
> >
> > I think the developer that was doing it before was using xlink or
> > xpointer to see if the folder had an href attribute and then called some
> > script to open the document and merge it with the parent creating one
> > big tree (to query later).
> >
> > Does anyone know what the best way to do this in .Net would be? I think
> > i could do it running the intial file through XSLT and use the
> > document() function but I'm wondering if there is a better way to do this.
>
> There is standard way of doing that - XInclude [1]. Then you can have the
> following in your document:
> <xi:include href="widgets.xml" xmlns:xi="
http://www.w3.org/2001/XInclude"/>
> This will include the whole widgets.xml, or
> <xi:include href="widgets.xml#xpointer(//folder[@name='widgets'])"
> xmlns:xi="
http://www.w3.org/2001/XInclude"/>
> to include only specified elements.
> The plumbing to process it under .NET you can find at GotDotNet, in
> XInclude.NET workspace [2]. It provides XIncludingReader class, which
> implements XmlReader so can be used everywhere. Just read your XML via this
> reader and don't care about underlying including and merging.
>
> [1]
http://www.w3.org/TR/xinclude > [2]
>
> --
> Oleg Tkachenko
>
http://www.tkachenko.com/blog > Multiconn Technologies, Israel
>