org.w3c.dom.Comment domText = (org.w3c.dom.Comment)node;
return new TextImplEx("<!--" + domText.getData() + "-->", parent);
}
Element domEle = ((Element)node);
int indexOfColon = domEle.getTagName().indexOf(":");
NamespaceImpl ns;
String localName;
if (indexOfColon != -1) {
localName = domEle.getTagName().substring(indexOfColon + 1);
ns = new NamespaceImpl(domEle.getNamespaceURI(),
domEle.getTagName().substring(0, indexOfColon));
} else {
localName = domEle.getLocalName();
if (localName == null) { //it is possible that localname isn't set but name is set
localName = domEle.getTagName();
}
if (domEle.getNamespaceURI() != null) {
ns = new NamespaceImpl(domEle.getNamespaceURI(), domEle.getPrefix());
} else {
if (domEle.getPrefix() != null) {
ns = new NamespaceImpl("", domEle.getPrefix());
} else {
ns = new NamespaceImpl("", "");
}
}
}
ElementImpl eleImpl =