I have built a xml parsing class that (surprisingly) parses xml. THe problem I am having is when I am opening a xml file that has been formated with spaces and crlf such as:
<?xml version='1.0' ?>
then try and do an fopen and fread it causes a parser error stating there is "XML error: junk after document element at line 1" now if I go into that document and take out all of that hidden formating then it works fine but takes away from the readability of the xml, also I am using xmldom to write xml and it seems to put in that hidden formating when writing to file anyway. Is their any option that anyone knows of to tell the parser (expat) to ignore this stuff?? To date I have been doing an ereg_replace to get rid of the formating but that just seems dumb to me am I wrong??