public void serializeNode(Node node) throws XMLStreamException { switch (node.getNodeType()) { case Node.DOCUMENT_NODE: serializeDocument((Document) node); break; case Node.ELEMENT_NODE: serializeElement((Element) node); break; case Node.CDATA_SECTION_NODE: serializeCDATASection((CDATASection) node); break; case Node.TEXT_NODE: serializeText((Text) node); break; case Node.PROCESSING_INSTRUCTION_NODE: serializeProcessingInstruction((ProcessingInstruction) node); break; case Node.COMMENT_NODE: serializeComment((Comment) node); break; default: throw new MarkLogicInternalException( "Cannot process node type of: "+node.getClass().getName() ); } } public void serializeDocument(Document document) throws XMLStreamException {
public void serializeNode(Node node) throws XMLStreamException { switch (node.getNodeType()) { case Node.DOCUMENT_NODE: serializeDocument((Document) node); break; case Node.ELEMENT_NODE: serializeElement((Element) node); break; case Node.CDATA_SECTION_NODE: serializeCDATASection((CDATASection) node); break; case Node.TEXT_NODE: serializeText((Text) node); break; case Node.PROCESSING_INSTRUCTION_NODE: serializeProcessingInstruction((ProcessingInstruction) node); break; case Node.COMMENT_NODE: serializeComment((Comment) node); break; default: throw new MarkLogicInternalException( "Cannot process node type of: "+node.getClass().getName() ); } } public void serializeDocument(Document document) throws XMLStreamException {