Dear all, I would like to parse a xml document and serialize it with entity references not replaced...
I've seen in the xerces' doc that by defautl, feature "http://apache.org/xml/features/dom/create-entity-ref-nodes" is set to true, and so prevent the entity reference to be replaced by their value. I've got the following code: 1�) parse the xml document with xerces // Parser import import org.apache.xerces.parsers.DOMParser; ... DOMParser parser = new DOMParser(); parser.parse(xmlDocument); Document doc = parser.getDocument(); ... 2�) serialize the doc ... switch (node.getNodeType()) { ... case Node.ENTITY_REFERENCE_NODE: writer.write("&" + node.getNodeName() + ";"); break; ... } I expect to obtain an entity reference in the serialized result (since xerces during parsing has not replaced them by their value, and the serialization process keeps those entity references), but actually it's not the case... What am I missing here? Thanks in advance for your responses, Cyril. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
