case Node.ELEMENT_NODE :
Element element = (Element) node;
if (!element.hasChildNodes())
break;
if (element.hasAttributes()) {
NamedNodeMap attributes = element.getAttributes();
int attributesLength = attributes.getLength();
for (Node child = element.getFirstChild(); child!=null;
child=child.getNextSibling()) {
if (child.getNodeType() != Node.ELEMENT_NODE) {
continue;
}
Element childElement = (Element) child;
for (int i = 0; i < attributesLength; i++) {
Attr currentAttr = (Attr) attributes.item(i);
if (!namespaceNs.equals(currentAttr.getNamespaceURI()))
continue;
if (childElement.hasAttributeNS(namespaceNs,
currentAttr.getLocalName())) {
continue;