예제 #1
0
 /**
  * Test get element returns null
  */
 public function testGetElementReturnsNull()
 {
     $filename = __DIR__ . "/../../resources/reader.docx.zip";
     $object = new XMLReader();
     $object->getDomFromZip($filename, '[Content_Types].xml');
     $element = $object->getElements('*')->item(0);
     $this->assertNull($object->getElement('yadayadaya', $element));
 }
예제 #2
0
 /**
  * Node "Allocations"
  * @param XMLReader $oXML
  * @param \DOMElement $domNode
  */
 private function readNodeAllocations(XMLReader $oXML, \DOMElement $domNode)
 {
     $oNodes = $oXML->getElements('*', $domNode);
     if ($oNodes->length > 0) {
         foreach ($oNodes as $oNode) {
             if ($oNode->nodeName == 'allocation') {
                 $this->readNodeAllocation($oNode);
             }
         }
     }
 }