ws513/TBXML — pull request #1 by mickeyl (2013-09-13 15:36:53+00:00)
Title: fix XML spec whitespace compliance

To ease CDATA processing, TBXML used to use a trick where after
moving the actual content 'over' the start of the CDATA section,
the remaning characters to the right are been overwritten with whitespace.
Lateron, TBXML cleans all the whitespace within(!) the text content,
thus removing the whitespace it added in the first step.

However, removing significant whitespace (enclosed within the text
portion of a tag) is against the spec. It's unfortunately not enough
to remove said portions of code, but you also need to catch up with the
CDATA trick. My approach is to indicate the end of the text with a \0
marker and setting the elementStart appropriately to continue searching.

As a neat side-effect, this also slightly improves the parsing speed.