Hi guys,
I have an xml document and I need copy part of the content to a new xml document, following an example:
<?xml encoding="utf-8" ?>
<Library>
<Location>
<Test> <---- split here
.....
.....
</Test>
<Test2>
.....
.....
</Test2>
<Location>
</Library>
<?xml encoding="utf-8" ?>
<Library>
<Location>
<Test> <---- split here
.....
.....
</Test>
<Test2>
.....
.....
</Test2>
<Location>
</Library>
To copy to clipboard, switch view to plain text mode
I want to create a new document xml taking the "Test" tag as my root element. How can I do that? The next few snippets of code:
...
xml.setContent(b); // It's ok, its working.
...
QByteArray b;
...
QDomDocument xml;
xml.setContent(b); // It's ok, its working.
QDomElement root = xml.documentElement();
QDomNode node = root.firstChild();
...
To copy to clipboard, switch view to plain text mode
Thanks,
Marcelo E. Geyer
Bookmarks