please fix the example - escape output!!! - cant say how many time's i've seen commercial code with bugs like that..

JSON is now more commonly used to do this stuff.. XML is used mainly for compatibility with REALLY OLD systems now.. ;)