Question

I've been struggling quite a bit with Xerces C++ and my unfamiliarity with all that is XML, but I need to use XML for a project I'm working on.

My question is how do I serialize portions of a DOM tree that I have already parsed and created of out of a XML instance document (validated against a schema I wrote) so that I can create many new instance documents (still containing the root element of the original document) in a way that they remain valid against my schema?

To be more specific, I have a large instance document with thousands of sets contained within a single root element that I need to individually place into separate files for later processing. Basically a large set of sets which need to each be placed into individual files and still validate separately.

I'm lost on the whole process of how to do this. I've not had any luck finding examples that serialize portions of a DOM tree and I find a lot of the terminology surrounding XML related documentation less than helpful.

Was it helpful?

Solution

Does this article (Section: XML Schema validation using serialization of grammars to disk) help?

We have successfully used the MemBufFormat described here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top