{
    "mode": "perldoc",
    "parameter": "XML::LibXML::RelaxNG",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/XML%3A%3ALibXML%3A%3ARelaxNG/json",
    "generated": "2026-06-15T14:55:16Z",
    "synopsis": "use XML::LibXML;\n$doc = XML::LibXML->new->parsefile($url);\n$rngschema = XML::LibXML::RelaxNG->new( location => $filenameorurl );\n$rngschema = XML::LibXML::RelaxNG->new( string => $xmlschemastring );\n$rngschema = XML::LibXML::RelaxNG->new( DOM => $doc );\neval { $rngschema->validate( $doc ); };",
    "sections": {
        "NAME": {
            "content": "XML::LibXML::RelaxNG - RelaxNG Schema Validation\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use XML::LibXML;\n$doc = XML::LibXML->new->parsefile($url);\n\n$rngschema = XML::LibXML::RelaxNG->new( location => $filenameorurl );\n$rngschema = XML::LibXML::RelaxNG->new( string => $xmlschemastring );\n$rngschema = XML::LibXML::RelaxNG->new( DOM => $doc );\neval { $rngschema->validate( $doc ); };\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The XML::LibXML::RelaxNG class is a tiny frontend to libxml2's RelaxNG implementation. Currently\nit supports only schema parsing and document validation.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "new\n$rngschema = XML::LibXML::RelaxNG->new( location => $filenameorurl );\n$rngschema = XML::LibXML::RelaxNG->new( string => $xmlschemastring );\n$rngschema = XML::LibXML::RelaxNG->new( DOM => $doc );\n\nThe constructor of XML::LibXML::RelaxNG may get called with either one of three parameters.\nThe parameter tells the class from which source it should generate a validation schema. It\nis important, that each schema only have a single source.\n\nThe location parameter allows one to parse a schema from the filesystem or a URL.\n\nThe string parameter will parse the schema from the given XML string.\n\nThe DOM parameter allows one to parse the schema from a pre-parsed XML::LibXML::Document.\n\nNote that the constructor will die() if the schema does not meed the constraints of the\nRelaxNG specification.\n\nvalidate\neval { $rngschema->validate( $doc ); };\n\nThis function allows one to validate a (parsed) document against the given RelaxNG schema.\nThe argument of this function should be an XML::LibXML::Document object. If this function\nsucceeds, it will return 0, otherwise it will die() and report the errors found. Because of\nthis validate() should be always evaluated.\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "Matt Sergeant, Christian Glahn, Petr Pajas\n",
            "subsections": []
        },
        "VERSION": {
            "content": "2.0134\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "2001-2007, AxKit.com Ltd.\n\n2002-2006, Christian Glahn.\n\n2006-2009, Petr Pajas.\n",
            "subsections": []
        },
        "LICENSE": {
            "content": "This program is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
            "subsections": []
        }
    },
    "summary": "XML::LibXML::RelaxNG - RelaxNG Schema Validation",
    "flags": [],
    "examples": [],
    "see_also": []
}