XML Parsing to get Attribute Value
I am parsing a xml using SAX Parser. Everythings working fine when the data I need to get is the body of a xml tag. The only problem I am getting is when the data I need is the attribute value of that XML tag. How do i get this attribute value? <xml att="value"> Body </xml> Suppose this is a tag, I am able to get Body but not value code I am using is: URL url = new URL("http://example.com/example.xml"); SAXParserFactory spf = SAXParserFactory.newInstance(); SAXParser sp = spf.newSAXParser(); XMLReader xr = sp.getXMLReader(); ExampleHandler myExampleHandler = new ExampleHandler(); xr