public function get_gaps() { $result = array(); $xpath = new DOMXPath($this->node->ownerDocument); $xpath->registerNamespace("qti", "http://www.imsglobal.org/xsd/imsqti_v2p0"); $search = $xpath->query("//qti:gap"); foreach ($search as $elem) { $obj = new Gap($elem, $this); $obj->validate(null); array_push($result, $obj); } return $result; }