public function FeedsXPathParserDOMXPath::__construct in Feeds XPath Parser 6
Same name and namespace in other branches
- 7 FeedsXPathParserDOMXPath.inc \FeedsXPathParserDOMXPath::__construct()
Constructs a FeedsXPathParserDOMXPath object.
Parameters
DOMDocument $doc: The DOMDocument that we're operating on.
File
- ./
FeedsXPathParserDOMXPath.inc, line 22 - Provides a custom version of DOMXPath for use with feeds_xpathparser.
Class
- FeedsXPathParserDOMXPath
- Wraps DOMXPath providing enhanced debugging and special namespace handling.
Code
public function __construct(DOMDocument $doc) {
$this->namespaces = array();
$simple = simplexml_import_dom($doc);
// An empty DOMDocument will make $simple NULL.
if ($simple !== NULL) {
$this->namespaces = $simple
->getNamespaces(TRUE);
}
$this->doc = $doc;
parent::__construct($doc);
}