PHP WDDX: Understanding Data Elements


Web Distributed Data Exchange Step By Step tutorial - Part 3: After know packet in WDDX, next question how do we store data into document to send to another system? We will begin with simple variable at php, then look how do we write at WDDX. Let's do it.

At PHP, we write such as:

$varInteger = 1;

At WDDX, we write:

<wddxPacket version='1.0'>
  <header />
  <data>
    <number>1</number>
  </data>
</wddxPacket>

When we want to write:

$studentNumber = 1;
$studentName = "Wiwit Siswoutomo";

We will write:

<wddxPacket version='1.0'>
  <header />
  <data>
    <struct>
	  <var name="studentNumber">
	    <number>1</number>
	  </var>
	  <var name="studentName">
	    <string>Wiwit Siswoutomo</string>
	  </var>
	</struct>
    <number>1</number>
  </data>
</wddxPacket>


Series this article:
PHP WDDX: Introduction
PHP WDDX: Understanding Anatomy of WDDX
PHP WDDX: Understanding Data Elements
PHP WDDX: Understanding Simple Data Type
PHP WDDX: Using Array Elements
PHP WDDX: Struct Element
PHP WDDX: Recordset Element
PHP WDDX: Simple Serialization Using PHP function
PHP WDDX: Complex Serialization
PHP WDDX: Unserializing Data
PHP WDDX: Creating Web Service Server
PHP WDDX: Creating Web Service Client

Bookmark and Share Tag: wddx, distributed data, data, elements Category: PHP Application Post : April 29th 2008 Read: 20,767

advertisements


blog comments powered by Disqus