[xsd-users] Elements with CDATA content

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


Hi Boris,
Forgive my ignorance, but I'm not seeing an obvious way to use custom classes to insert a CDATA section in an element as described in option 2 described below:
> > http://www.codesynthesis.com/pipermail/xsd-users/2008-March/001590.html 
> 

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, 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.  Any suggestions or code snippets to get me off the ground?
Thanks,James 		 	   		  


More information about the xsd-users mailing list