Re: XML_Serializer - flexible node attributes?
| From: | Andrew Nagy | Date: | Mon, 19 Dec 2005 14:55:26 +0000 |
| Subject: | Re: XML_Serializer - flexible node attributes? | ||
| References: | 1 2 3 4 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-22308@lists.php.net to get a copy of this message | ||
Stephen Musgrave wrote:
Here is an example what I am trying to accomplish:
...
<ExchangeVisitor requestID="96" userID="userID" printForm="1">
<LastName>bbbb</LastName>
<FirstName>aaaa</FirstName>
</ExchangeVisitor>
...
Using XML_Serializer, here is how you would accomplish this:
$data = array('ExchangeVisitor' => array('attributesArray' => array('requestID' => 96, 'userID' => 'userID', 'printForm' => 1), 'lastName' => 'bbbb', 'firstName' => 'aaaa'));
Hope this helps
Andrew