我有一个问题,其中包含使用XMLReader的当前节点的geting路径。我需要像" getNodePath()"对于XMLReader。例如:
$reader = new \XMLReader();
$reader->open('/path...');
while ($reader->read()) {
if($reader->nodeType == \XMLREADER::ELEMENT && $reader->localName == "file"){
$tags_file['elem'] = clone $reader;
$tags_file['path'] = $reader->*getNodePath()*;
}
}