this.dhandler.startElement(node.getNodeName(), attr);
} // end if
} // end else if
else if (node.getNodeType() == Node.ENTITY_REFERENCE_NODE) {
if (this.chandler instanceof DefaultHandler2) {
DefaultHandler2 d2 = (DefaultHandler2) this.chandler;
d2.startEntity(node.getNodeName());
} // end if
if (node.getChildNodes().getLength() == 0) {
String value = node.getNodeValue();
if (this.chandler != null) {
this.chandler.characters(value.toCharArray(), 0, value
.length());
} // end if
if (this.dhandler != null) {
this.dhandler.characters(value.toCharArray(), 0, value
.length());
} // end if
} // end if
} // end else if
else if (node.getNodeType() == Node.TEXT_NODE) {
String value = node.getNodeValue();
if (this.chandler != null) {
this.chandler.characters(value.toCharArray(), 0, value
.length());
} // end if
if (this.dhandler != null) {
this.dhandler.characters(value.toCharArray(), 0, value
.length());
} // end if
} // end else if
else if (node.getNodeType() == Node.CDATA_SECTION_NODE) {
String value = node.getNodeValue();
if (this.chandler != null) {
this.chandler.characters(value.toCharArray(), 0, value
.length());
} // end if
if (this.dhandler != null) {
this.dhandler.characters(value.toCharArray(), 0, value
.length());
} // end if
} // end else if
else if (node.getNodeType() == Node.COMMENT_NODE) {
if (this.lHandler != null) {
String value = node.getNodeValue();
this.lHandler.comment(value.toCharArray(), 0, value
.length());
} // end if
} else if (node.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE) {
if (this.chandler != null) {
ProcessingInstruction pi = (ProcessingInstruction) node;
this.chandler.processingInstruction(pi.getTarget(), pi
.getData());
} // end if
if (this.dhandler != null) {
ProcessingInstruction pi = (ProcessingInstruction) node;
this.dhandler.processingInstruction(pi.getTarget(), pi
.getData());
} // end if
} // end else if
NodeList nl = node.getChildNodes();
for (int i = 0; i < nl.getLength(); i++) {
Node child = nl.item(i);
this.serialize(child);
} // end for
if (node.getNodeType() == Node.ELEMENT_NODE) {
if (this.chandler != null) {
String nsUri = node.getNamespaceURI();
if (nsUri == null) {
nsUri = "";
}
this.chandler.endElement(nsUri, node.getLocalName(), node
.getNodeName());
} // end if
if (this.dhandler != null) {
this.dhandler.endElement(node.getNodeName());
} // end if
} // end else if
else if (node.getNodeType() == Node.ENTITY_REFERENCE_NODE) {
if (this.chandler instanceof DefaultHandler2) {
DefaultHandler2 d2 = (DefaultHandler2) this.chandler;
d2.endEntity(node.getNodeName());
} // end if
} // end else if
} catch (SAXException ignore) {
}
} // end serialize()