* representation is a xml well-formed fragment corresponding to the
* representation of this node.
* @return the String representation of this AnyNode.
*/
public String toString() {
Serializer serializer = new BackwardCompatibilityContext().getSerializer();
if (serializer == null) {
throw new RuntimeException("Unable to obtain serializer");
}
StringWriter writer = new StringWriter();
serializer.setOutputCharStream(writer);
try {
AnyNode2SAX.fireEvents(this, serializer.asDocumentHandler());
} catch (java.io.IOException ioe) {
return privateToString();
} catch (org.xml.sax.SAXException saxe) {
throw new RuntimeException(saxe.getMessage());
}