{
    "content": [
        {
            "type": "text",
            "text": "# XML::LibXML::RelaxNG (perldoc)\n\n## NAME\n\nXML::LibXML::RelaxNG - RelaxNG Schema Validation\n\n## SYNOPSIS\n\nuse 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 ); };\n\n## DESCRIPTION\n\nThe XML::LibXML::RelaxNG class is a tiny frontend to libxml2's RelaxNG implementation. Currently\nit supports only schema parsing and document validation.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **METHODS**\n- **AUTHORS**\n- **VERSION**\n- **COPYRIGHT**\n- **LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "XML::LibXML::RelaxNG",
        "section": "",
        "mode": "perldoc",
        "summary": "XML::LibXML::RelaxNG - RelaxNG Schema Validation",
        "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 ); };",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 26,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 3,
                "subsections": []
            }
        ],
        "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": []
            }
        }
    }
}