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. it is good to unstand and easy to remember forever
View Tutorial By: Abdul at 2011-11-10 21:03:41
2. Very good article on string , please also mentions
View Tutorial By: Subham at 2014-04-29 18:01:04
5. dear i have different files of ms access 2010 like
View Tutorial By: neeo at 2012-01-16 07:02:20
6. what is the data type of the variable direction di
View Tutorial By: [email protected] at 2009-12-25 03:07:46
7. It may be good ,when you stressed on the point why
View Tutorial By: Kishore Mylavarapu at 2011-05-25 01:28:50
9. thats is really too gud... very easy example to un
View Tutorial By: radhika at 2011-11-27 16:32:25
10. The above example for abstract class is very good.
View Tutorial By: saafia at 2013-08-19 14:33:54