Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Copying XML Fragments Copying XML FragmentsTo: NULL Date: 3/11/2008 11:01:00 AM I need to copy the data/structure from one XML file to another. I found I can get to the data I need, it resides under a node I can navigate to: XPathDocument _docSrc = new XPathDocument(_pathSrc); XPathNavigator navSrc = ((IXPathNavigable)_docSrc).CreateNavigator(); XPathNavigator grpSrc = navSrc.SelectSingleNode("/A/B/C/D"); XPathDocument _docDst = new XPathDocument(_pathDst); XPathNavigator navDst = ((IXPathNavigable)_docDst).CreateNavigator(); XPathNavigator grpDst = navDst.SelectSingleNode("/A/B/C/D"); Essentially, I need everything under the D node in Dst to be erased. How do I do that, first of all? Second, I need to copy everything from under the D node in Src to under the D node in Dst. What is the simples way to do that? TIA- | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
