} else if (node.getNodeType() == Node.TEXT_NODE) {
characters(node.getNodeValue());
} else {
try {
FormattedOutputStreamRecordContentHandler handler = new FormattedOutputStreamRecordContentHandler();
XMLFragmentReader xfragReader = new XMLFragmentReader(namespaceResolver);
xfragReader.setContentHandler(handler);
xfragReader.setProperty(Constants.LEXICAL_HANDLER_PROPERTY, handler);
xfragReader.parse(node, newNamespace, newName);
} catch (SAXException sex) {
throw XMLMarshalException.marshalException(sex);
}
}
}