XML Parsing using PHP {Intermediate} - How to escape illegal characters?

Hi

this xml tutorial is great but I need to have html tags (<a href""></a> etc…) in the xml and when i do the results are not good.
the tutorial mentions escaping illegal characters like “<” but doesnt say how…

Any help would be great

Jimmy