manoj kumar
asked on
Href value to match content in DOM Parser in java
I have a xml like <url href="www.google.com">www.google1.com</url>
i am using dom parser to cheak both url should match or not (www.google.com and www.google1.com)
so i am Writing The code is :
String s=""; Document doc = dBuilder.parse(inputFile); NodeList nodeList= doc.getElementsByTagName("url"); for (int i = 0; i < nodeList.getLength(); i++) { Node node = nodeList.item(i); if(node.getNodeName().equals("url")){//Reconfirm after that getting content Element element = (Element) node; s=element.getTextContent(); String s2=element.getAttribute("href"). }So can u help me how to get href content so that i can cheak both value
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER