public String content() {
        
        String s = "";
        org.w3c.dom.NodeList nodeList = domNode.getChildNodes();

        for (int i = 0; i < nodeList.getLength(); i++) {
            
            org.w3c.dom.Node node = nodeList.item(i);
            int type = node.getNodeType();
            AdapterNode adpNode = new AdapterNode(node); //inefficient, but works

            if (type == ELEMENT_TYPE) {
                
                //Skip subelements that are displayed in the tree.   
                if (treeElement(node.getNodeName())) {
                    continue;
                }
                s += (node.getNodeName());
                //s += adpNode.content();
                //s += ("</" + node.getNodeName() + ">");
            } else if (type == TEXT_TYPE) {
                
                s += node.getNodeValue();
                
            } else if (type == ENTITYREF_TYPE) {
                
                // The content is in the TEXT node under it
                s += adpNode.content();
                
            } else if (type == CDATA_TYPE) {
                
                // The "value" has the text, same as a text node.
                //   while EntityRef has it in a text node underneath.
                //   (because EntityRef can contain multiple sub-elements)
                // Convert angle brackets and ampersands for display
                StringBuffer sb = new StringBuffer(node.getNodeValue());

                for (int j = 0; j < sb.length(); j++) {
                    if (sb.charAt(j) == '<') {
                        sb.setCharAt(j, '&');
                        sb.insert(j + 1, "lt;");
                        j += 3;
                    } else if (sb.charAt(j) == '&') {
                        sb.setCharAt(j, '&');
                        sb.insert(j + 1, "amp;");
                        j += 4;
                    }
                }

                s += ("<pre>" + sb + "\n</pre>");
            }

            // Ignoring these:
            //   ATTR_TYPE      -- not in the DOM tree
            //   ENTITY_TYPE    -- does not appear in the DOM
            //   PROCINSTR_TYPE -- not "data"
            //   COMMENT_TYPE   -- not "data"
            //   DOCUMENT_TYPE  -- Root node only. No data to display.
            //   DOCTYPE_TYPE   -- Appears under the root only
            //   DOCFRAG_TYPE   -- equiv. to "document" for fragments
            //   NOTATION_TYPE  -- nothing but binary data in here
        }

        return s;
    }