SimpleXML and documentation
| From: | Eric Daspet | Date: | Fri, 02 Jan 2004 15:50:29 +0000 |
| Subject: | SimpleXML and documentation | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-173638@lists.php.net to get a copy of this message | ||
Hi
I'm working on a PHP5 project with some simple XML. I've seen examples of SimpleXML in CVS ("tests" and "examples" directories) but cannot find any real documentation.
Is there any docs somewhere ? where ?
If not, does someone can answer a few questions ?
- how do I add an element ?
- can I change the text content of an element ? if yes, how can I deal with something like "<element> text1 <sub/> text2 </element>" ?
- can I delete elements ? attributes ?
- how do I deal with namespaces ? I've seen a "register_ns" method but do not know if registration is inherited, and do not know how to use namespaces after registration ($element->ns:subelement is not a valid PHP syntax)
- I've seen many times that simpleXML is limited to 3 levels of nesting but there is a phpt with 4 levels. Is there a limitation ? if yes, which one ?
thanks per advance for all answers.
--
Eric Daspet