{
    "mode": "perldoc",
    "parameter": "XML::Node",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/XML%3A%3ANode/json",
    "generated": "2026-06-12T09:35:52Z",
    "synopsis": "use XML::Node;\n$xmlnode = new XML::Node;\n$xmlnode->register( $nodetype, $callbacktype => \\&callbackfunction );\n$xmlnode->register( $nodetype, $callbacktype => \\$variable );\nopen(FOO, 'xmlgenerator |');\n$p3->parse(*FOO);\nclose(FOO);\n$xmlnode->parsefile( $xmlfilename );",
    "sections": {
        "NAME": {
            "content": "XML::Node - Node-based XML parsing: a simplified interface to XML::Parser\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use XML::Node;\n\n$xmlnode = new XML::Node;\n$xmlnode->register( $nodetype, $callbacktype => \\&callbackfunction );\n$xmlnode->register( $nodetype, $callbacktype => \\$variable );\n\nopen(FOO, 'xmlgenerator |');\n$p3->parse(*FOO);\nclose(FOO);\n\n$xmlnode->parsefile( $xmlfilename );\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "If you are only interested in processing certain nodes in an XML file, this module can help you\nsimplify your Perl scripts significantly.\n\nThe XML::Node module allows you to register callback functions or variables for any XML node. If\nyou register a call back function, it will be called when the nodes of the type you specified\nare encountered. If you register a variable, the content of a XML node will be appended to that\nvariable automatically.\n\nSubroutine register accepts both absolute and relative node registrations.\n\nHere is an example of absolute path registration:\n\n1. register(\">TestCase>Name\", \"start\" => \\&handleTestCaseNamestart);\n\nHere are examples of single node name registration:\n\n2. register( \"Name\", \"start\" => \\&handleNamestart);\n3. register( \"Name\", \"end\"   => \\&handleNameend);\n4. register( \"Name\", \"char\"  => \\&handleNamechar);\n\nHere is an example of attribute registration:\n\n5. register(\">TestCase:Author\", \"attr\" => \\$testcaseauthor);\n\nAbsolute path trigger condition is recommended because a \"Name\" tag could appear in different\nplaces and stands for different names.\n\nExample:\n\n1  <Testcase>\n2     <Name>Something</Name>\n3     <Oracle>\n4         <Name>Something</Name>\n5     </Oracle>\n6  </Testcase>\n\nStatement 1 causes &handleTestCaseNamestart to be called when parsing Line 2. Statements\n2,3,4 cause the three handler subroutines to be called when parsing both Line 2 and Line 4.\n\nThis module uses XML::Parser.\n",
            "subsections": []
        },
        "EXAMPLE": {
            "content": "Examples \"test.pl\" and \"parseorders.pl\" come with this perl module.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "XML::Parser\n",
            "subsections": []
        },
        "NOTE": {
            "content": "When you register a variable, XML::Node appends strings found to that variable. So please be\nsure to clear that variable before it is used again.\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "Chang Liu <liu@ics.uci.edu>\n",
            "subsections": []
        },
        "LAST MODIFIED": {
            "content": "$Date: 2001/12/10 11:38:28 $\n",
            "subsections": []
        }
    },
    "summary": "XML::Node - Node-based XML parsing: a simplified interface to XML::Parser",
    "flags": [],
    "examples": [
        "Examples \"test.pl\" and \"parseorders.pl\" come with this perl module."
    ],
    "see_also": []
}