class XdpTreeNode extends IconTreeNode {

    /**
     * A serial version UID.
     */
    private static final long serialVersionUID = -6431790925424045933L;

    /**
     * Constructs an XdpTreeNode
     *
     * @param node the XML node
     */
    public XdpTreeNode(Node node) {
        super(null, node);
        if (node instanceof Element) {
            Element element = (Element) node;
            addChildNodes(element.attributes());
        }
        if (node instanceof Branch) {
            Branch branch = (Branch) node;
            addChildNodes(branch.content());
        }
        if (node instanceof Attribute) {
            icon = IconFetcher.getIcon("attribute.png");
            return;
        }
        if (node instanceof Text) {
            icon = IconFetcher.getIcon("text.png");
            return;
        }
        if (node instanceof ProcessingInstruction) {
            icon = IconFetcher.getIcon("pi.png");
            return;
        }
        if (node instanceof Document) {
            icon = IconFetcher.getIcon("xfa.png");
            return;
        }
        icon = IconFetcher.getIcon("tag.png");
    }

    private void addChildNodes(List list) {
        for (Object o : list) {
            Node n = (Node) o;
            if (n instanceof Namespace) {
                continue;
            }
            if (n instanceof Comment) {
                continue;
            }
            this.add(new XdpTreeNode(n));
        }
    }

    public Node getNode() {
        return (Node) getUserObject();
    }

    public String toString() {<FILL_FUNCTION_BODY>}
}

        Node node = getNode();
        if (node instanceof Element) {
            Element e = (Element) node;
            return e.getName();
        }
        if (node instanceof Attribute) {
            Attribute a = (Attribute) node;
            StringBuilder buf = new StringBuilder();
            buf.append(a.getName());
            buf.append("=\"");
            buf.append(a.getValue());
            buf.append('"');
            return buf.toString();
        }
        if (node instanceof Text) {
            Text t = (Text) node;
            return t.getText();
        }
        if (node instanceof ProcessingInstruction) {
            ProcessingInstruction pi = (ProcessingInstruction) node;
            StringBuilder buf = new StringBuilder("<?");
            buf.append(pi.getName());
            buf.append(' ');
            buf.append(pi.getText());
            buf.append("?>");
            return buf.toString();
        }
        if (node instanceof Document) {
            return "XFA Document";
        }
        return getNode().toString();
    
<methods>public void <init>(java.lang.String) ,public void <init>(java.lang.String, java.lang.Object) ,public javax.swing.Icon getIcon() <variables>protected javax.swing.Icon icon,private static final long serialVersionUID