Java Reference
In-Depth Information
}
}
catch (IOException ioe)
{
System.err.println("IOE: "+ioe);
}
catch (SAXException saxe)
{
System.err.println("SAXE: "+saxe);
}
catch (FactoryConfigurationError fce)
{
System.err.println("FCE: "+fce);
}
catch (ParserConfigurationException pce)
{
System.err.println("PCE: "+pce);
}
}
static void dump(Element e)
{
System.out.println("Element:
"+e.getNodeName()+",
"+e.getLocalName()+
",
"+e.getPrefix()+",
"+e.getNamespaceURI());
NamedNodeMap nnm = e.getAttributes();
if (nnm != null)
for (int i = 0; i < nnm.getLength(); i++)
{
Node node = nnm.item(i);
Attr
attr
=
e.getAttributeNode(node.getNodeName());
System.out.printf(" Attribute %s = %s%n", at-
tr.getName(),
attr.getValue());
}
Search WWH ::




Custom Search