I'm working on a school project where we have to encode literary texts into XML, and then post them on our web pages. I have a web page that mostly uses HTML and CSS, but occasionally uses a PHP include in order to get all my headers and footers modular and in separate files. The problem with this setup is, when I have a php include to include (i.e. import) my XML file, I get this parsing error: Parse error: parse error in /home1/j/jpr226/public_html/homestead.xml on line 1
, where line 1 is just the xml declaration, something like <?xml version="1.0"?>
.
If I copy-and-paste the XML file into the HTML file, it seems to work roughly as expected, but when I use php to include this file, I get this error.
I'm guessing PHP is trying to parse this XML file somehow, and when it can't do that, it generates this error. Is there a way to tell PHP to lay off, and stop trying to interpret my XML file?
This is from http://i5.nyu.edu/~jpr226/texts.php