Go to the source code of this file.
◆ test()
Definition at line 192 of file grima-xmlbag.php.
193 $xml = file_get_contents(
"item-sample.xml");
195 print
"EnumerationA: " . $item_item_data[
'enumeration_a'] .
"\n\n";
196 $item_item_data[
'enumeration_a'] =
"NOOOOOOOOO";
197 print $item_item_data->xml->saveXML();
◆ xml_debug()
Definition at line 19 of file grima-xmlbag.php.
20 $retval = get_class($obj).
"\n";
22 case ($obj instanceof DOMDocument):
23 $retval .=
"XPath: {$obj->getNodePath()}\n".$obj->saveXML($obj);
25 case ($obj instanceof DOMElement):
26 $retval .=
"XPath: {$obj->getNodePath()}\n".$obj->ownerDocument->saveXML($obj);
28 case ($obj instanceof DOMAttr):
29 $retval .=
"XPath: {$obj->getNodePath()}\n".$obj->ownerDocument->saveXML($obj);
31 case ($obj instanceof DOMNodeList):
32 $retval .=
"NodeList of length {$obj->length}\n";
34 for ($i = 0; $i < $obj->length; $i++) {
35 $retval .=
"Item #$i, " .
xml_debug($obj->item($i));
39 return "Instance of unknown class";