*/
<%@page import="org.w3c.dom.Node, org.w3c.dom.Element, org.w3c.dom.Document, org.w3c.dom.NodeList, javax.xml.parsers.DocumentBuilder, javax.xml.parsers.DocumentBuilderFactory" %>
<%!
public boolean isTextNode(Node n)
{
return n.getNodeName().equals("#text");
}
%>
<%
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.parse("http://localhost:8080/chapter02/people.xml");
%>
List of people
| Name | Age |
|---|---|
| <%= currentItem.getFirstChild().getNodeValue() %> |


No comments:
Post a Comment