how i can find the “abc” from this tag through JAVA code and SAX parser.
<first name="abc">My Text<first>
for example i am using the java code given below to find “My Text” from the above tag.
NodeList firstNameList = firstPersonElement.getElementsByTagName("first");
Element firstNameElement = (Element)firstNameList.item(0);
String type = firstPersonElement.getTextContent();
NodeList textFNList = firstNameElement.getChildNodes();
System.out.println("First Name : " +
((Node)textFNList.item(0)).getNodeValue().trim());
but i don’t know how to find “abc” from <first name="abc">My Text<first>
I searched by myself but i didn’t find my exact solution.
name="abc"is an attribute of thefirstelement.