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
1. Please guys i need sms.zip. I tried SMS.RAR but al
View Tutorial By: Waseem at 2010-03-06 15:48:40
3. I wanna to name ,subject and marks of every subjec
View Tutorial By: raveesh yadav at 2012-10-13 19:56:47
4. Simple and to the point. Thanks for this tutorial.
View Tutorial By: Balvinder at 2008-08-03 04:40:05
5. Nice one.your example proves that if you are apply
View Tutorial By: Nisarg pathak at 2015-09-30 17:23:37
8. This is by far the easiest way I have yet seem, ma
View Tutorial By: doahh at 2010-03-08 11:23:48