Prefixes for XML elements using PEAR::XML_Tree
| From: | Nele Vogel | Date: | Tue, 13 Jul 2004 15:55:48 +0000 |
| Subject: | Prefixes for XML elements using PEAR::XML_Tree | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-13675@lists.php.net to get a copy of this message | ||
Hello list!
Here's what I am trying to do :)
---------------------------------
I would like to build an xml file using PEAR::XML_Tree. The root element is
supposed to reside in xmlns:prefix="http://www.someuri.org". All child
elements should also be bound to that prefix - like this:
<prefix:facility
xmlns="http://www.someuri.org/"
xmlns:prefix="http://www.someuri.org/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.openecdis.org/
../xsd/facility_1.0.xsd"
>
<prefix:id>123</prefix:id>
[... more elements ...]
</prefix:facility>
Is this possible using PEAR::XML_Tree without changing the source files
'Tree.php' and 'Tree/Node.php'?
I didn't understand how to use the namespace concept that is already
implemented in 'Tree.php' and 'Tree/Node.php', does anyone know whether a
tutorial or a description is available?
Here's my system configuration
-------------------------------
I am using
- PEAR::XML_Tree 2.0.0RC2 beta
- Apache 1.3.27
- PHP 4.3.1
on SuSE Linux 8.2.
Thank you very much for your help!
Regards,
Nele.