XML Parsing using PHP {Intermediate}. Data Truncation

I created a PHP XML parser based on the “XML Parsing using PHP {Intermediate}” tutorial written by Jubba. It works great except for one flaw that I can’t seem to figure out.

If one of the the tags contains one of the five predefined internal entities in XML. – & in the case I’m testing, the data gets truncated.

So if I have:

<headline>Headline part A &amp; Headline part B</headline>

The parser only returns:
[size=2]Headline part B

It should return:
[/size][size=2]Headline part A & Headline part B[/size]
[size=2]
Has anyone elese had this problem?
[/size]