[xsd-users] Elements with CDATA content

Boris Kolpackov boris at codesynthesis.com
Wed Mar 7 09:33:06 EST 2012


Hi James,

James & Veri Martin <verimart at hotmail.com> writes:

> The difficulty I'm having is that, from the examples I've found showing
> how to use the xerces dom to insert cdata sections I need a DOMDocument
> instance that I use to create a cdata section that can then be appended
> as a child to the element that I'm trying to serialize.  In the
> serialization operator, I have a reference to a DOMElement instance and
> a reference to an instance of my custom type, but no DOMDocument,

You can call the getOwnerDocument() function on the DOMElement to get
DOMDocument. This is covered in Xerces-C++ documentation.

> and I can't see how to preprocess the custom type instance prior to
> serializing it onto the DOMElement reference in order to add the
> cdata section.

I don't understand what you mean by "preprocess" here.

Boris



More information about the xsd-users mailing list