org.w3c.dom.Comment domText = (org.w3c.dom.Comment)node;
return new CommentImpl(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();
}
String prefix = domEle.getPrefix();
if(prefix == null) {
prefix = "";
}
if (domEle.getNamespaceURI() != null) {
ns = new NamespaceImpl(domEle.getNamespaceURI(), prefix);
} else {
if (prefix != null) {
ns = new NamespaceImpl("", prefix);
} else {
ns = new NamespaceImpl("", "");
}
}
}
ElementImpl eleImpl =