attr.getAttributeValue(),
(attr.getNamespace() != null) ?
dest.declareNamespace(attr.getNamespace()) : null);
}
for (Iterator i = src.getChildren(); i.hasNext();) {
OMNode node = (OMNode) i.next();
if (node.getType() == OMNode.ELEMENT_NODE) {
OMElement element = (OMElement) node;
OMElement child = _create(element);
if (child != null) {
_copyElement(element, child);
dest.addChild(child);
}
} else if (node.getType() == OMNode.CDATA_SECTION_NODE) {
OMText text = (OMText) node;
factory.createOMText(dest,text.getText(), OMNode.CDATA_SECTION_NODE);
} else if (node.getType() == OMNode.TEXT_NODE) {
OMText text = (OMText) node;
factory.createOMText(dest,text.getText());
} else if (node.getType() == OMNode.COMMENT_NODE) {
OMComment comment = (OMComment) node;
factory.createOMComment(dest, comment.getValue());
} else if (node.getType() == OMNode.PI_NODE) {
OMProcessingInstruction pi = (OMProcessingInstruction) node;
factory.createOMProcessingInstruction(dest, pi.getTarget(), pi.getValue());
} else if (node.getType() == OMNode.SPACE_NODE) {
OMText text = (OMText) node;
factory.createOMText(dest, text.getText(), OMNode.SPACE_NODE);
} else if (node.getType() == OMNode.ENTITY_REFERENCE_NODE) {
OMText text = (OMText) node;
factory.createOMText(dest, text.getText(), OMNode.ENTITY_REFERENCE_NODE);
}
}
return dest;