{
    "content": [
        {
            "type": "text",
            "text": "# XML::Stream::Node (perldoc)\n\n## NAME\n\nXML::Stream::Node - Functions to make building and parsing the tree easier to work with.\n\n## SYNOPSIS\n\nJust a collection of functions that do not need to be in memory if you\nchoose one of the other methods of data storage.\nThis creates a hierarchy of Perl objects and provides various methods\nto manipulate the structure of the tree.  It is much like the C library\nlibxml.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **FORMAT**\n- **METHODS**\n- **AUTHOR**\n- **COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "XML::Stream::Node",
        "section": "",
        "mode": "perldoc",
        "summary": "XML::Stream::Node - Functions to make building and parsing the tree easier to work with.",
        "synopsis": "Just a collection of functions that do not need to be in memory if you\nchoose one of the other methods of data storage.\nThis creates a hierarchy of Perl objects and provides various methods\nto manipulate the structure of the tree.  It is much like the C library\nlibxml.",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "FORMAT",
                "lines": 31,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 54,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 4,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "XML::Stream::Node - Functions to make building and parsing the tree easier to work with.\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "Just a collection of functions that do not need to be in memory if you\nchoose one of the other methods of data storage.\n\nThis creates a hierarchy of Perl objects and provides various methods\nto manipulate the structure of the tree.  It is much like the C library\nlibxml.\n",
                "subsections": []
            },
            "FORMAT": {
                "content": "The result of parsing:\n\n<foo><head id=\"a\">Hello <em>there</em></head><bar>Howdy<ref/></bar>do</foo>\n\nwould be:\n\n[ tag:       foo\natt:       {}\nchildren:  [ tag:      head\natt:      {id=>\"a\"}\nchildren: [ tag:      \"xmlstream:node:cdata\"\nchildren: \"Hello \"\n]\n[ tag:      em\nchildren: [ tag:      \"xmlstream:node:cdata\"\nchildren: \"there\"\n]\n]\n]\n[ tag:      bar\nchildren: [ tag:      \"xmlstream:node:cdata\"\nchildren: \"Howdy \"\n]\n[ tag:      ref\n]\n]\n[ tag:      \"xmlstream:node:cdata\"\nchildren: \"do\"\n]\n]\n",
                "subsections": []
            },
            "METHODS": {
                "content": "new()          - creates a new node.  If you specify tag, then the root\nnew(tag)         tag is set.  If you specify data, then cdata is added\nnew(tag,cdata)   to the node as well.  Returns the created node.\n\ngettag() - returns the root tag of the node.\n\nsettag(tag) - set the root tag of the node to tag.\n\naddchild(node)      - adds the specified node as a child to the current\naddchild(tag)         node, or creates a new node with the specified tag\naddchild(tag,cdata)   as the root node.  Returns the node added.\n\nremovechild(node) - removes the child node from the current node.\n\nremovecdata() - removes all of the cdata children from the current node.\n\naddcdata(string) - adds the string as cdata onto the current nodes\nchild list.\n\ngetcdata() - returns all of the cdata children concatenated together\ninto one string.\n\ngetattrib(attrib) - returns the value of the attrib if it is valid,\nor returns undef is attrib is not a real\nattribute.\n\nputattrib(hash) - for each key/value pair specified, create an\nattribute in the node.\n\nremoveattrib(attrib) - remove the specified attribute from the node.\n\naddrawxml(string,[string,...]) - directly add a string into the XML\npacket as the last child, with no\ntranslation.\n\ngetrawxml() - return all of the XML in a single string, undef if there\nis no raw XML to include.\n\nremoverawxml() - remove all raw XML strings.\n\nchildren() - return all of the children of the node in a list.\n\nattrib() - returns a hash containing all of the attributes on this\nnode.\n\ncopy() - return a recursive copy of the node.\n\nXPath(path) - run XML::Stream::XPath on this node.\n\nXPathCheck(path) - run XML::Stream::XPath on this node and return 1 or 0\nto see if it matches or not.\n\nGetXML() - return the node in XML string form.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "By Ryan Eatmon in June 2002 for http://jabber.org/\n\nCurrently maintained by Darian Anthony Patrick.\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright (C) 1998-2004 Jabber Software Foundation http://jabber.org/\n\nThis module licensed under the LGPL, version 2.1.\n",
                "subsections": []
            }
        }
    }
}