Comment on Tutorial - XML and Java - Parsing XML using Java Tutorial By totheriver.com
Comment Added by : Suvarna
Comment Added at : 2012-01-12 06:56:55
Comment on Tutorial : XML and Java - Parsing XML using Java Tutorial By totheriver.com
I am using getAttribute but its not returning the answer i expect. I have an XML string: <TestDoc><templateName>myReportName</templateName></TestDoc>
I have converted this into a DOM doc called inputDoc and now i want to get the value of the attribute templateName.
Element root = inputDoc.getDocumentElement();
String Template = root.getAttribute("templateName");
and it returns null as Template. Any ideas?
Thanks very much.
- Data Science
- Cloud Computing
- Java Beans
- Mac OS X
- Office 365
- Tech Reviews
Subscribe to Tutorials
5. Good example. However as someone said, it would be
View Tutorial By: Neo Cambell at 2010-03-10 11:02:06
6. i'am having an error in main.xml in line RelativeL
View Tutorial By: Nova at 2013-04-18 11:21:06
9. Awesome article. It's very useful. Despite it didn
View Tutorial By: Matheus at 2015-02-24 12:06:05