I have a case like getting an XML and convert the XML elements to document object and getting the element values and attributes which i have been created already
Her
public static void main(String[] args) {
final String xmlStr = "\n"+
"Pankaj 25 \n"+
"Developer Male ";
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder;
try
{
builder = factory.newDocumentBuilder();
Document doc = builder.parse( new InputSource( new StringReader( xmlStr )) );
} catch (Exception e) {
e.printStackTrace();
}
}