see code below:::
here is the xml
string <MAIN><RESPONSE><PAGE>success.jsp</PAGE></DATA><ITEM>This is the first item</ITEM><ITEM>This is the second item</ITEM><ITEM>This is the third one</ITEM></DATA><ERROR></ERROR></RESPONSE></MAIN>
the code below works find for displaying the <PAGE>success.jsp</PAGE> but I need to display all three items in<ITEM></ITEM> in the browser.
Any Suggestions Thanks
<%@page import="javax.xml.parsers.DocumentBuilderFactory,java.net.*,java.io.*,javax.xml.parsers.DocumentBuilder,org.w3c.dom.*" %>
<%!Document
doc;%>
<html>
<head>
<title>My first template</title>
</head>
<body>
<%
doc = (Document)request.getAttribute("theDOM");
NodeList nameItems=doc.getElementsByTagName("PAGE");
out.print("Length (" + nameItems.getLength() + ")" + "<br>");
for(int i=0;i<nameItems.getLength();i++)
{
String Itemvalue=nameItems.item(i).getFirstChild().getNodeValue();
out.print("Item Data as follows (" + Itemvalue + ")" + "<br>");
}
%>
<br>The Data Response from IDS</br>
<br><h2><font color=#DB1260>Congrats Successful Login Welcome to Success</font></h2></br>
</body>
</html>
Thanks in advance
------------------
Sun Certified
Java Programmer
Sun Certified Java Developer
I-Net Certified
A+ Certified
Network+ Certified
MCP
SCJO, SCJD, SCWCD, I-Net+, A+, Network+, MCSD, MCDBA, MCP, MCT