HomePHP Page 3 - Data Exchange with XML, WDDX and PHP
Polly Wants A Cracker - PHP
You may never have heard of it before - but if your job involvesexchanging data between different servers and applications, you're going tobe hearing a lot about it very soon. Find out how WDDX makes it possible tocreate and transmit platform-neutral data structures across the Web, andhow it can be combined with PHP to create a whole new generation of Webapplications (including new content syndication and financial updateservices).
Since WDDX data follows the basic rules of XML markup, it can easily be validated against a DTD. And if you look at the DTD, you'll quickly see that all WDDX "packets" are constructed in a standard format.
The root, or document, element for WDDX data is always the <wddxPacket> element, which marks the beginning and end of a WDDX block.
This is immediately followed by a header containing comments,
<comment>Who da man?</comment></header>
and a data area containing the XML representation of the data structure.
This data area can contain any of WDDX's basic datatypes, which are described in detail in the WDDX DTD - here's the short version, with examples:
Boolean values, represented by the element <boolean> - for example