You are here

public function views_xml_backend_plugin_query_xml::get_dom_document in Views XML Backend 7

Returns the DOM document to use for parsing.

This is easily overridable so that subclasses can change the method of loading. For example, using DOMDocument::loadHTML(), or html5-php's HTML::loadHTML().

Parameters

string $content: The content to load in the DOM.

Return value

DOMDocument|NULL A new DOM document, or NULL on failure.

1 call to views_xml_backend_plugin_query_xml::get_dom_document()
views_xml_backend_plugin_query_xml::parse in ./views_xml_backend_plugin_query_xml.inc

File

./views_xml_backend_plugin_query_xml.inc, line 346
Contains views_xml_backend_plugin_query_xml.

Class

views_xml_backend_plugin_query_xml
@file Contains views_xml_backend_plugin_query_xml.

Code

public function get_dom_document($content) {
  $doc = new DOMDocument();
  if (!($success = $doc
    ->loadXML($content))) {
    return;
  }
  return $doc;
}