Renato, This is the line that you are looking for. DomDocument new_doc = theDOM->cloneNode(true);
On 2 Oct 2012, at 12:38, "Renato Tegon Forti" <re...@acm.org> wrote: > Hi All, > > > > Anyone can help-me? > > > > I have this documment: > > > > <?xml version="1.0" encoding="UTF-8" ?> > > <x1 versao="1.10" xmlns="http://www.ts.inf/x1"> > > <x2> > > <x3> > > <x4> > > ... > > </x4> > > </x3> > > </x2> > > </x1> > > > > I am loadind this document using: > > > > XercesDOMParser * parser = new XercesDOMParser; > > // ... > > DOMDocument *theDOM = parser->getDocument(); > > // .. > > > > Now I want create a new document like this: > > > > <?xml version="1.0" encoding="UTF-8" ?> > > <x3> > > <x4> > > ... > > </x4> > > </x3> > > > > Using firs document like an base! > > > > How I can do this? Anyone can send me a sample code! Thaks a lot! >