开发者

How do I get the line number of a DOMElement?

I'm trying to get the line number of a DOMElement object in PHP - the documentati开发者_如何学Pythonon says DOMElement extends DOMNode which implements the getLineNo() method, however, when I try to use this method I get:

Fatal error: Call to undefined method DOMElement::getLineNo()


Upgrade to PHP 5.3 or higher, see the documentation. On a side note: dynamically added nodes (i.e. not in the XML document or string on load) will return 0.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜