Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: XML (question test) Which language should i use? >Thread Next - Re: XML (question test) Which language should i use? Re: XML (question test) Which language should i use?To: NULL Date: 7/9/2004 7:51:00 PM I used this method to read the XML file,
DocumentBuilderFactory myfactory =
DocumentBuilderFactory.newInstance();
DocumentBuilder builder=myfactory.newDocumentBuilder();
Document doc=builder.parse("http://.......1.xml");
doc.normalize();
NodeList ROOTELEMENT =doc.getElementsByTagName("CHILDNAME");
then use this
<% for (int i=0;i< ROOTELEMENT.getLength();i++){
Element CHILDELEMENT=(Element) ROOTELEMENT.item(i); %>
<tr>
<td><%=CHILDELEMENT.getElementsByTagName("TAGNAME").item(0).getFirstChild().getNodeValue()%>
</td>
</tr>
to display on the JSP webpage.
Could you tell me your evaluation for this method? is that suitable
for me to use it in the test?
some body mentioned about bean/servlet. Do i need to use them? will it
be better?
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
