Java基础知识的三十个经典问答(9)
发布时间:2021-06-07
发布时间:2021-06-07
Java基础知识的三十个经典问答
throws SAXException
{
currentValue = new String(ch, start, length);
}
public void endElement(String name) throws SAXException
{
if (currentElement.equals(name))
table.put(currentElement, currentValue);
}
}
JSP内容显示源码,SaxXml.jsp:
< %@page errorPage=ErrPage.jsp contentType=text/html;charset=GB2312 %> >
< %@page import=java.io.*%>
< %@page import=java.util.Hashtable %>
< %@page import=org.w3c.dom.*% >
< %@page import=org.xml.sax.* %>
< %@page import=javax.xml.parsers.SAXParserFactory %>
< %@page import=javax.xml.parsers.SAXParser %>
< %@page import=SAXHandler %>
< %@
File file = new File(c:\people.xml);
FileReader reader = new FileReader(file);
下一篇:实训4驱动桥拆装检修与调整