Hope someone can help me. I'm just dipping my toe into working with XML documents and I'm having a problem. So far, I've managed to read documents without a problem but I'm now taking the next step of adding to and creating new XML sheets. I'm having a look at this article here:
..and trying to run this piece of code from XAMPP:
- Code: Select all
$element=$dom->createElement('testnode','This is the root element of the new DOM document');
// insert the new element as root (child of the document)
// tell the browser the output is XML via the 'Content-Type' HTTP header
// display DOM document
But's it's coming up with this error message:
This page contains the following errors:
error on line 1 at column 60: Space required after the Public Identifier
Below is a rendering of the page up to the first error.
Can anyone tell me, is it XAMPP causing this error, or a problem with the code itself?