XML_Serializer: adding attributes
| From: | Charles Gebhard | Date: | Wed, 25 Aug 2004 23:11:45 +0000 |
| Subject: | XML_Serializer: adding attributes | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-14298@lists.php.net to get a copy of this message | ||
greetings all,
i was playing around with XML_Serializer the other day and could not figure out how to put attributes in the resulting XML doc.
for instance, i'm trying to create the following XML doc:
<?xml version="1.0">
<books>
<book id="455" lang="en">
<author email="jim@nowhere.org">Jim</author>
<title alt="more stuff">stuff</title>
</book>
...
</books>
p.s. after reading the source, i couldn't figure out what this option meant (not sure if it has any relevance to this question):
'attributesArray' // all values in this key will be treated as attributes
thanks for any help.
-chuck