diff options
author | Sterling Hughes <sterling@php.net> | 2003-05-21 14:06:00 (GMT) |
---|---|---|
committer | Sterling Hughes <sterling@php.net> | 2003-05-21 14:06:00 (GMT) |
commit | c418dd14b5852e89e7666a825bf3dd2a441d022b (patch) | |
tree | 8627a99065e0d795a1baac4971d765b3dd8a49df /ext/simplexml/examples | |
parent | 2d1a6e5dc23ace4583ee2e6f8b55c1ef21f06803 (diff) | |
download | php-c418dd14b5852e89e7666a825bf3dd2a441d022b.tar.gz |
add an example of modifying the XML tree
Diffstat (limited to 'ext/simplexml/examples')
-rw-r--r-- | ext/simplexml/examples/security.php | 6 | ||||
-rw-r--r-- | ext/simplexml/examples/security.xml | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/ext/simplexml/examples/security.php b/ext/simplexml/examples/security.php new file mode 100644 index 0000000..ef5f20c --- /dev/null +++ b/ext/simplexml/examples/security.php @@ -0,0 +1,6 @@ +<?php +$s = simplexml_load_file('security.xml'); +echo $s->id; +$s->id = 20; +simplexml_save_file($s, 'security.new.xml'); +?> diff --git a/ext/simplexml/examples/security.xml b/ext/simplexml/examples/security.xml new file mode 100644 index 0000000..d954a02 --- /dev/null +++ b/ext/simplexml/examples/security.xml @@ -0,0 +1,4 @@ +<?xml version="1.0"?> +<security> + <id>15</id> +</security> |