php5 + xml nodes
| From: | ccesario | Date: | Sat, 28 Feb 2004 17:37:05 +0000 |
| Subject: | php5 + xml nodes | ||
| Groups: | php.xml.dev | ||
| Request: | Send a blank email to php-xml-dev+get-332@lists.php.net to get a copy of this message | ||
Xml example
--------------------------------
<?xml version="1.0"?>
<config>
<network defaultroute="" dnsserver="">
<interface name="lan" type="ethernet" device="eth0"
ip="192.168.1.1" subnet="24"/>
<interface name="wan" type="ethernet" device="eth1"
ip="192.168.1.1" subnet="24"/>
<alias number="1" desc="teste" device="eth0"/>
<alias number="2" desc="teste1" device="eth1"/>
</network>
</config>
---------------------------------
Hello all ...
I'm working with simplexml (php5) to manipulate the data in
xml file, but I'm having one problem.
I need manipulate the nodes (add and remove) .
example
I need add more one node
<interface name="dmz" type="ethernet" device="eth3" ip="xxxxxxx"
subnet="24"/>
and remove the node
<alias number="2" desc="teste1" device="eth1"/>
but I don't have idea ...
somebody can help me ?
Any example ...
greats
Carlos