Lauren,

You might want to file an enhancement request for that.

Instead of using the DOM as a workaround it would probably be quicker to use the following code:

StringWriter myWriter = new StringWriter();
..
Marshaller m = new Marshaller(myWriter);
..
m.setMarshalAsDocument(false);
m.marshal(anyNode);

String myString = myWriter.toString();

--Keith

Lauren Bish wrote:

When I call toString() on an AnyNode, I always get the Declaration:

<?xml version="1.0" encoding="UTF-8"?>
<ClassExtensionClass><TEST-String-Element>jklsdfkjhsdfksdfjfsdfsdjhsdf</TEST-String-Element></ClassExtensionClass>



I want the XML Elements without the declaration to store as a BLOB in a database:



<ClassExtensionClass><TEST-String-Element>jklsdfkjhsdfksdfjfsdfsdjhsdf</TEST-String-Element></ClassExtensionClass>



How do I do that from AnyNode? It doesn't seem obvious from the API.

Right now I am stuffing the whole thing into a Document and then getting the DocumentElement out, but that seems wasteful.

TIA.



----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user






----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user

Reply via email to