You are here

protected function EasyRdf_Parser_RdfXml::initXMLParser in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/RdfXml.php \EasyRdf_Parser_RdfXml::initXMLParser()

@ignore

1 call to EasyRdf_Parser_RdfXml::initXMLParser()
EasyRdf_Parser_RdfXml::parse in vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/RdfXml.php
Parse an RDF/XML document into an EasyRdf_Graph

File

vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/RdfXml.php, line 83

Class

EasyRdf_Parser_RdfXml
A pure-php class to parse RDF/XML.

Code

protected function initXMLParser() {
  if (!isset($this->xmlParser)) {
    $parser = xml_parser_create_ns('UTF-8', '');
    xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 0);
    xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
    xml_set_element_handler($parser, 'startElementHandler', 'endElementHandler');
    xml_set_character_data_handler($parser, 'cdataHandler');
    xml_set_start_namespace_decl_handler($parser, 'newNamespaceHandler');
    xml_set_object($parser, $this);
    $this->xmlParser = $parser;
  }
}