List of usage examples for org.dom4j Node ENTITY_REFERENCE_NODE
short ENTITY_REFERENCE_NODE
To view the source code for org.dom4j Node ENTITY_REFERENCE_NODE.
Click Source Link
From source file:org.zenonpagetemplates.twoPhasesImpl.ZPTDocumentFactory.java
License:Open Source License
@SuppressWarnings({ "unchecked" }) static private void mapContent(Element element, ZPTElement zptElement, ZPTDocument zptDocument, Stack<Map<String, Slot>> slotStack) throws SAXException, PageTemplateException, IOException { // Use default template content for (Iterator<Node> i = element.nodeIterator(); i.hasNext();) { Node node = i.next();//from w w w . ja va 2 s.c om switch (node.getNodeType()) { case Node.ELEMENT_NODE: zptElement.addContent(getNewZPTElement((Element) node, zptDocument, slotStack)); break; case Node.TEXT_NODE: zptElement.addContent(new TextNode(node.getText())); break; case Node.CDATA_SECTION_NODE: zptElement.addContent(new CDATANode(node.getText())); break; case Node.NAMESPACE_NODE: // Already handled /* Namespace declared = (Namespace)node; if (zptDocument.isNamespaceToDeclare(declared)){ zptDocument.addNamespace(declared); } else { zptElement.addNamespaceStaticAttribute(declared); } break;*/ case Node.ATTRIBUTE_NODE: // Already handled case Node.COMMENT_NODE: // Remove all comments case Node.DOCUMENT_TYPE_NODE: case Node.ENTITY_REFERENCE_NODE: case Node.PROCESSING_INSTRUCTION_NODE: default: // Nothing to do } } }