$info =
[ 'localName' =>
$reader->localName,
'prefix' =>
$reader->prefix,
'nodeType' =>
new ConstStub(self::NODE_TYPES
[$reader->nodeType
],
$reader->nodeType
),
'depth' =>
$reader->depth,
'isDefault' =>
$reader->isDefault,
'isEmptyElement' => \XMLReader::NONE ===
$reader->nodeType ? null :
$reader->isEmptyElement,
'xmlLang' =>
$reader->xmlLang,
'attributeCount' =>
$reader->attributeCount,
'value' =>
$reader->value,
'namespaceURI' =>
$reader->namespaceURI,
'baseURI' =>
$reader->baseURI ?
new LinkStub($reader->baseURI
) :
$reader->baseURI,
$props =>
$properties,
];
if ($info[$props] = Caster::
filter($info[$props], Caster::EXCLUDE_EMPTY,
[],
$count)) { $info[$props] =
new EnumStub($info[$props]);
$info[$props]->cut =
$count;
} $a = Caster::
filter($a, Caster::EXCLUDE_UNINITIALIZED,
[],
$count);
$info = Caster::
filter($info, Caster::EXCLUDE_EMPTY,
[],
$count);
// +2 because hasValue and hasAttributes are always filtered