This class can be used to parse XML documents and retrieve data into arrays.
It is an improvement of the original class written by MA Razzaque Rupom to make it process XML with illegal characters used in HTML documents.
It pre-processes the XML document to escape ampersand characters so the PHP XML parsing functions can accept them. After extracting the document structure into arrays, the class restores the original ampersands and fixes any illegal characters.