public function Query($node, $xml = false) { if ($xml) { $source = new XMLDom(); $dom_sxe = $source->importNode($xml, true); $source->appendChild($dom_sxe); } else { $source = $this; } $xpath = new DOMXPath($source); if (is_array($this->namespace)) { $xpath->registerNamespace($this->namespace['name'], $this->namespace['value']); } $return = $xpath->query($node); if (!$return) { return false; } elseif ($return->length == 0) { return false; } else { return $return; } }
<?php require "../library/Class.Dom.php"; //receive list of params via POST $dom = new XMLDom(); $dom->create();
public function toDOM() { $xml = new XMLDom(); $xml->appendChild($xml->importNode($this, true)); return $xml; }
<?php require "../library/Class.Dom.php"; //param GET value $dom = new XMLDom(); $dom->find();
<?php require "../library/Class.Dom.php"; //receive param GET page and GET limit $dom = new XMLDom(); $dom->list_json();
<?php require "../library/Class.Dom.php"; //receive param GET existent Node ID and list of params via POST KEY with New Value $dom = new XMLDom(); $dom->update();