コード例 #1
0
 public function parse(\XMLReader $xmlReader, $startingDepth = 0, $parseOne = false)
 {
     parent::parse($xmlReader, $startingDepth, $parseOne);
     // Keep scanning elements while we have elements to scan and we are still within our scope
     // namely that the depth is greater than our own depth.
     while ($xmlReader->read() && $xmlReader->depth > $startingDepth) {
         if ($xmlReader->nodeType == \XMLReader::ELEMENT) {
             foreach ($this->nodeHandlers as $name => $strategy) {
                 if ($name == "*" || $name == $xmlReader->name) {
                     $strategy->parse($xmlReader, $xmlReader->depth);
                     if ($parseOne) {
                         return true;
                     }
                 }
             }
         }
     }
     return false;
 }
コード例 #2
0
 public function parse(\XMLReader $xmlReader, $startingDepth = 0, $parseOne = false)
 {
     $this->startDepth = $startingDepth;
     parent::parse($xmlReader, $startingDepth, $parseOne);
 }