Using SimpleXML
Hello,
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,
Hugh
.
Relevant Pages
- reading a XML file on every page execution - convert to PHP?
... into a simpleXML node every time index.php loads. ... The simplest thing to do would be to serialize the xml file into ... include the .php file, de-serialize the simplexml object and go, ... If file A requires file B, and file B cannot load, file A suffers ... (comp.lang.php) - Problem with "undefined entities" using DOM
... I have a problem with both DOM and SimpleXML. ... I'm reading an XML file ... HOW CAN I AVOID those warnings??? ... (comp.lang.php) - Re: simplexml and CDATA
... element when parsing an xml file or string with simplexml. ... CDATA and what simplexml does. ... In CDATA sections, you can include e.g. ... (comp.lang.php) - SimpleXML & libxml options (XInclude)
... I'm trying to get the SimpleXML extension to read an XML file and process the XInclude statements within the XML file. ... The SimpleXML docs state that libxml options may be specified using the predefined constants that are available when PHP is compiled with libxml support. ... So, looking at the libxml options, I see there is a predefined constant LIBXML_XINCLUDE which when specified should implement XInclude substitution. ... (php.general) - SimpleXML + name spaces
... I have an XML file with some elements like those below ... I'm trying to parse it using simplexml ... Prev by Date: ... (alt.php) |
|