Re: XML_Serializer - flexible node attributes?
| From: | Andrew Nagy | Date: | Fri, 16 Dec 2005 18:50:29 +0000 |
| Subject: | Re: XML_Serializer - flexible node attributes? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-22280@lists.php.net to get a copy of this message | ||
Stephen Musgrave wrote:
The above example has a mix of node attributes (email) and nodes (author's name). I haven't been able to figure out how to make that happen in XML_Serialize. Is it possible now?Yes, this is possible as I am building a very complex XML document with XML_Serializer. You can use the "attributesArray" option to define the key that will hold your array of attributes.
Someone had responded to the thread, explaining that they should use XML_FastCreate instead.Yes, I am in the process of switching my XML_Serializer object over to an XML_FastCreate because I don't think there is anyway to have multiple elements at one level with the same name due to the nature of associative arrays. It looks like XML_FastCreate can accomplish what you need to do. Andrew