Dear Guys, Can anyone please help me to get this clarified.
We had the below code in place for cloning a node. Node outNode = inNode.cloneNode(deep); And then we found that clone node in xerces may sometimes delete a attribute, so we added below piece of code but this is still not working. Can you please let us know the issue? "My guess is that xerces has another bug that sometimes value of the attribute becomes null/blank". Is my understanding correct? if ( inNode.getNodeType() == Node.ELEMENT_NODE && inNode.hasAttributes() ){ NamedNodeMap attrMap = inNode.getAttributes(); Attr attr = null; Attr outAttr = null ; Attr debugAttr = null; String debugVal = null; for ( int i=0; i<attrMap.getLength(); i++ ){ attr = (Attr)attrMap.item(i); // only append deleted attr. if ((((Element)outNode).getAttributeNode (attr.getName())) == null ){ Dbg.dbg(Dbg.ERRORS, this, "XERCES PARSER issue1 for GTAC0493287 reproduced for "+attr.getName()); outAttr = getRenderer ().getOutDocument().createAttribute(attr.getName()); outAttr.setValue( attr.getValue () ); ((Element)outNode).setAttributeNode (outAttr); } } } Thanks, karthik This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only. If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited. Visit us at http://www.polarisFT.com --------------------------------------------------------------------- To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org For additional commands, e-mail: j-users-h...@xerces.apache.org