jyxo / php

Jyxo PHP Library
http://jyxo.github.com/php/
BSD 3-Clause "New" or "Revised" License
65 stars 72 forks source link

Reading text/content from empty XML tags #21

Closed Andrewsville closed 9 years ago

Andrewsville commented 9 years ago

Right now, if an XmlReader is positioned on an empty tag and you call getTextValue() or getContent(), it calls read() as the first thing, advances beyond the empty tag and effectively starts processing its parent returning the text/XML content from that point to its end.

The obvious answer could be "you silly, don't run it on an empty tag" but I'd like to propose a consistent solution.

Hence this PR :)

kukulich commented 9 years ago

Looks good to me

Andrewsville commented 9 years ago

Thanks. I'll merge it to master and then it can be cherry picked to 3.0 or something.