[xsd-users] Examples of serializing to DOM

Gagnon, Joseph - 0553 - MITLL Joseph.Gagnon at ll.mit.edu
Thu Apr 23 09:52:45 EDT 2015


Hello,

 

I've just started investigating Code Synthesis XSD and what it can do.  In
the C++/Tree Mapping user manual there's a chapter on serialization, but it
does not provide a full example of how to go about serialization to DOM.

 

// Obtain the object model.

//

std::auto_ptr<type> r = ...

using namespace xercesc;

XMLPlatformUtils::Initialize ();

 

{

// Create a DOM instance. Set custom namespace mapping and schema

// location attributes.

//

DOMDocument& doc = ...

 

// Serialize to DOM.

//

name (doc, *r);

 

// Serialize the DOM document to XML.

//

...

}

 

XMLPlatformUtils::Terminate ();

 

For example, what needs to be done to complete the assignment to the DOM
document object?  Also, the last part that indicates that the DOM will be
serialized to XML.  What are the steps needed to do that?

 

Thanks,

Joe Gagnon

 

Engineer II

Group 58 - Cyber Systems & Technology

MIT Lincoln Laboratory

Lexington, MA

 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5625 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20150423/0f476826/smime.bin


More information about the xsd-users mailing list