/**
  * @param XMLReaderIterator $iterator
  * @param int|int[] $nodeType one or more type constants  <http://php.net/class.xmlreader>
  *      XMLReader::NONE            XMLReader::ELEMENT         XMLReader::ATTRIBUTE       XMLReader::TEXT
  *      XMLReader::CDATA           XMLReader::ENTITY_REF      XMLReader::ENTITY          XMLReader::PI
  *      XMLReader::COMMENT         XMLReader::DOC             XMLReader::DOC_TYPE        XMLReader::DOC_FRAGMENT
  *      XMLReader::NOTATION        XMLReader::WHITESPACE      XMLReader::SIGNIFICANT_WHITESPACE
  *      XMLReader::END_ELEMENT     XMLReader::END_ENTITY      XMLReader::XML_DECLARATION
  * @param bool $invert
  */
 public function __construct(XMLReaderIterator $iterator, $nodeType, $invert = false)
 {
     parent::__construct($iterator);
     $this->allowed = (array) $nodeType;
     $this->reader = $iterator->getReader();
     $this->invert = $invert;
 }
 protected function getAttributeValues()
 {
     /* @var $node XMLReaderNode */
     $node = parent::current();
     if ('*' === $this->attr) {
         $attrs = $node->getAttributes()->getArrayCopy();
     } else {
         $attrs = (array) $node->getAttribute($this->attr);
     }
     return $attrs;
 }
 public function __construct(XMLElementIterator $iterator, $expression)
 {
     parent::__construct($iterator);
     $this->expression = $expression;
 }