private function getXPath(\DOMNode $node) { if (!$this->xpath) { $this->xpath = new \DOMXPath($node->ownerDocument); } return $this->xpath; }