Example #1
0
 private function removeFormActions(DOMDocument $doc)
 {
     $actions = $doc->xpath("//div[@class='actions']");
     foreach ($actions as $element) {
         $element->parentNode->removeChild($element);
     }
 }
Example #2
0
 /**
  * @return Xpath
  */
 private function getXpath()
 {
     if ($this->_document instanceof Document) {
         return $this->_document->xpath();
     } elseif (isset($this->_xpath) && (\FluentDOM::$isHHVM || $this->_xpath->document === $this->_document)) {
         return $this->_xpath;
     } else {
         $this->_xpath = new Xpath($this->getDocument());
         $this->applyNamespaces();
         return $this->_xpath;
     }
 }