例如XML信息如下:
<?xml version="1.0"?>
<book>
<contents>
<chapter title="Introduction" number="1">
<topic name="XML Matters"/>
<topic name="What's Important"/>
<topic name="The Essentials"/>
<topic name="What&apos;s Next?"/>
</chapter>
<chapter title="Nuts and Bolts" number="2">
<topic name="The Basics"/>
<topic name="Constraints"/>
<topic name="Transformations"/>
<topic name="And More..."/>
<topic name="What&apos;s Next?"/>
</chapter>
</contents>
</book>1.求将上面的XML发送到本机一个JSP或Servlet的代码,如JSP文件名为jsp1.jsp,SERVLET名为servlet1
2.在JSP或SERVLET中接收并解析,最好用DOM的方式,在线等,立即结贴.