[xsd-users] Elements with CDATA content

James & Veri Martin verimart at hotmail.com
Wed Mar 7 09:55:39 EST 2012


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


The custom type instance in the serialization operator represents the element for which I want the CDATA content, and my understanding
is that the CDATA section is treated in the DOM as a child element of the to-be-serialized type.  By "preprocess" I am referring to
what needs to be done, if anything, with the custom type reference prior to serializing it to the DOMElement instance in the serialization operator.


If I first do something like this:
void operator<< (xercesc::DOMElement& e, const CustomType& x)

{
const CustomType_base &b(x);
e << b;
}
...the text data from instance x, together with the attributes that are defined for it, would be written to the DOMElement instance without the cdata section.  So how do I add the cdata section as a child of the element represented by CustomType instance x?
 		 	   		  


More information about the xsd-users mailing list