Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: load into XmlDocument form XPathDOcument [Thread Next] Re: load into XmlDocument form XPathDOcumentTo: NULL Date: 9/1/2004 12:06:00 AM My apologies for the previous 2 postings. Both solutions work flawlessly. "Jack Fox" <jackfox@i...> wrote in message news:RFRYc.3259$w%6.2256@n...... > Well...XSL didn't work either. Apparently omitting the "xml" tag at the > start of a document impares the navigator, although I can still completely > load the document into either XPathDocument or XmlDocument. > > > "Jack Fox" <jackfox@i...> wrote in message > news:XmRYc.3350$8d1.1571@n...... > > Looks like there is a bug in XPathNavigatorReader. I tried both > > ReadFragmentXml and ReadInnerXml. On more complex xml trees it apparently > > failed to read the entire tree, but I haven't fully debugged it. (I think > my > > xmls are missing the usual opening xml tag, but both XmlDocument and > > XPathDocument have been able to load them without problem.) > > > > I guess I will have to learn enough XSL to copy a source tree into a > result > > tree as same. > > > > > > "Oleg Tkachenko [MVP]" <oleg@NO!SPAM!PLEASEtkachenko.com> wrote in message > > news:%23mlivAmjEHA.156@T...... > > > Jack Fox wrote: > > > > > > > Is there an easy way to load an entire XPathDocument into a new > > XmlDocument? > > > > > > > > The best I can come up with is to learn enough XSL to write verbatim > > from > > > > the XPathDocument into some sort of writer, then use some sort of > reader > > to > > > > load the XmlDocument. > > > > > > > > (Yeah, this sounds like a backasswards requirement, but the > > XPathDocument is > > > > already at hand, and short of being an XSL whiz, there are some things > > which > > > > are just easier to do with an XmlDocument.) > > > > > > The most efficient way is to use XPathNavigatorReader to read > > > XPathDocument (via XPathNavigator) into XmlDocument. > > > XPathNavigatorReader is part of Mvp.Xml library [1]. > > > > > > [1] http://sourceforge.net/projects/mvp-xml/ > > > -- > > > Oleg Tkachenko [XML MVP] > > > http://blog.tkachenko.com > > > > > > | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
