Using SimpleXML

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I have started using SimpleXML and can do most things, but there are a
couple of things that I can't seem to figure out.

Currently, I can:

1.  Open & load an XML file
2.  Manually parse the XML file
3.  Search the XML file using XPath
4.  Make changes to existing nodes (values)

However, I can't seem to be able to:

1.  Add a new node / element.
2.  Save my changes back to the XML file

Am I missing something, or are these things that currently cannot be
done with SimpleXML?

Thanks so much,


Re: Using SimpleXML

Kimmo Laine wrote:
Quoted text here. Click to load it

Unless next_page.php generates PHP, the script with this include will
only get HTML.

Quoted text here. Click to load it


    if (isset($_GET['foo'])) {
      echo '<?php echo $_GET[\'foo\']; ?>';
    } else {
      echo '<?php echo \'Not available\'; ?>';

File not found: (R)esume, (R)etry, (R)erun, (R)eturn, (R)eboot

Site Timeline