public class XmlTest { public static void main(String[] args) throws Exception { String data = ""; data += "http://schemas.xmlsoap.org/soap/envelope/\">"; data += ""; data += ""; data += ""; data += "";
byte[] buffer = data.getBytes(); ByteArrayInputStream bai = new ByteArrayInputStream(buffer);
System.out.println(list.getLength()); Element ele = null; if(list.getLength()>0) { ele = (Element)list.item(0); System.out.println("list:" + ele); }
DOMBuilder b = new DOMBuilder(); org.jdom.Element element = b.build(ele); System.out.println("ret:" + element.getText()); XMLOutputter out = new XMLOutputter(); out.output(element, System.out); } }
댓글 영역