Using PHP's XMLReader, how do I get the line number of the current node?
Posted
by scotts
on Stack Overflow
See other posts from Stack Overflow
or by scotts
Published on 2010-03-27T19:42:56Z
Indexed on
2010/03/27
19:43 UTC
Read the original article
Hit count: 407
Using the XMLReader XML parser in PHP 5.3, I need to get the line number of the current node. A column number or total offset from the beginning of the file would be nice, too.
Hopefully I don't have to use some hack like parsing every raw node string for newlines (with readOuterXML()
), but I don't see a getLineNo()
property like in the DOM...
© Stack Overflow or respective owner