{
    "mode": "perldoc",
    "parameter": "RDF::Redland::Parser",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/RDF%3A%3ARedland%3A%3AParser/json",
    "generated": "2026-06-13T11:29:35Z",
    "synopsis": "use RDF::Redland;\n...\nmy $parser=new RDF::Redland::Parser(\"rdfxml\");\nmy $parser2=new RDF::Redland::Parser(undef, \"application/rdf+xml);\n# Return as an RDF::Redland::Stream\nmy $stream=$parser->parseasstream($sourceuri, $baseuri);\n# Store in an RDF::Redland::Model\n$parser->parseintomodel($sourceuri, $baseuri, $model);",
    "sections": {
        "NAME": {
            "content": "RDF::Redland::Parser - Redland RDF Syntax Parsers Class\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use RDF::Redland;\n\n...\nmy $parser=new RDF::Redland::Parser(\"rdfxml\");\nmy $parser2=new RDF::Redland::Parser(undef, \"application/rdf+xml);\n\n# Return as an RDF::Redland::Stream\nmy $stream=$parser->parseasstream($sourceuri, $baseuri);\n\n# Store in an RDF::Redland::Model\n$parser->parseintomodel($sourceuri, $baseuri, $model);\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This class represents parsers of various syntaxes that can deliver a RDF model either as a\nRDF::Redland::Stream of RDF::Redland::Statement objects or directly into an RDF::Redland::Model\nobject.\n",
            "subsections": []
        },
        "CONSTRUCTORS": {
            "content": "new [NAME [MIMETYPE [URI]]]\nCreate a new RDF::Redland::Parser object for a syntax parser named *NAME*, with MIME Type\n*MIMETYPE* and/or URI *URI*. Any field can be undef or omitted; if all are omitted, a\nparser that provides MIME Type application/rdf+xml will be requested.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "parseasstream SOURCEURI BASEURI\nParse the syntax at the RDF::Redland::URI *SOURCEURI* with optional base RDF::Redland::URI\n*BASEURI*. If the base URI is given then the content is parsed as if it was at the base URI\nrather than the source URI.\n\nReturns an RDF::Redland::Stream of RDF::Redland::Statement objects or undef on failure.\n\nparseintomodel SOURCEURI BASEURI MODEL [HANDLER]\nParse the syntax at the RDF::Redland::URI *SOURCEURI* with optional base RDF::Redland::URI\n*BASEURI* into RDF::Redland::Model *MODEL*. If the base URI is given then the content is\nparsed as if it was at the base URI rather than the source URI.\n\nIf the optional *HANDLER* is given, it is a reference to a sub with the signature sub\nhandler($$$$$$$$$) { my($code, $level, $facility, $message, $line, $column, $byte, $file,\n$uri)=@; ... } that receives errors in parsing.\n\nparsestringasstream STRING BASEURI\nParse the syntax in *STRING* with required base RDF::Redland::URI *BASEURI*.\n\nReturns an RDF::Redland::Stream of RDF::Redland::Statement objects or undef on failure.\n\nparsestringintomodel STRING BASEURI MODEL [HANDLER]\nParse the syntax in *STRING* with required base RDF::Redland::URI *BASEURI* into\nRDF::Redfland::Model *MODEL*.\n\nIf the optional *HANDLER* is given, it is a reference to a sub with the signature sub\nhandler($$$$$$$$$) { my($code, $level, $facility, $message, $line, $column, $byte, $file,\n$uri)=@; ... } that receives errors in parsing.\n\nfeature URI [VALUE]\nGet/set a parser feature. The feature is named via RDF::Redland::URI *URI* and the value is\na RDF::Redland::Node. If *VALUE* is given, the feature is set to that value, otherwise the\ncurrent value is returned.\n\nnamespacesseen\nGet the set of namespace declarations seen during parsing as a hash of key:prefix string\n(may be ''), value: RDF::Redland::URI objects.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "RDF::Redland::URI\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Dave Beckett - http://www.dajobe.org/\n",
            "subsections": []
        }
    },
    "summary": "RDF::Redland::Parser - Redland RDF Syntax Parsers Class",
    "flags": [],
    "examples": [],
    "see_also": []
}