阅读背景:

如何用GWT向客户机发送XML文档?

来源:互联网 

I have this piece of code:

我有这段代码:

public void generateXML(DynamicForm form) {
        Document doc = XMLParser.createDocument();

        Element root = doc.createElement("root");
        doc.appendChild(root);

        Element node1 = doc.createElement("node1");
        node1.setAttribute("attribute","test");
        node1.appendChild(doc.createTextNode("my value"));
        doc.appendChild(node1);

        Element node2 = doc.createElement("node2");
        node2.setAttribute("attribute","anothertest");
        doc.appendChild(node2);
        System.out.println(doc.toString());
    }
public v



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: