When I use the following code to serialize the DOM, it does not include
namespace declarations. How do I turn that on?
public String toString()
{
try
{
Document doc = getDocument();
OutputFormat format = new OutputFormat(doc);
StringWriter stringOut = new StringWriter();
XMLSerializer serial = new XMLSerializer(stringOut, format);
serial.asDOMSerializer();
serial.serialize(doc.getDocumentElement());
return stringOut.toString();
}
catch (Exception e)
{
return e.toString();
}
}
Thanks for any help,
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]