走
走来走去
Unregistered / Unconfirmed
GUEST, unregistred user!
private StringBuffer xml2Table(String s)<br> {<br> StringBuffer stringbuffer = new StringBuffer();<br> Object obj = null;<br> try<br> {<br> DocumentBuilderFactory documentbuilderfactory = DocumentBuilderFactory.newInstance();<br> DocumentBuilder documentbuilder = documentbuilderfactory.newDocumentBuilder();<br> Document document = documentbuilder.parse(new BufferedInputStream(new ByteArrayInputStream(s.getBytes("gb2312")));<br> org.w3c.dom.Element element = document.getDocumentElement();<br> if(element.getNodeType() == 1 && "root".equals(element.getNodeName()))<br> stringbuffer.append("代码。。。。"<br> }<br> return stringbuffer;<br> }