try
{
// Let the result tree handler add the attribute and its String value.
String localName = QName.getLocalPart(nodeName);
if(prefix != null && prefix.length() > 0){
rhandler.addAttribute(nodeNamespace, localName, nodeName, "CDATA", val, true);
}else{
rhandler.addAttribute("", localName, nodeName, "CDATA", val, true);
}
}
catch (SAXException e)