WDDX
| From: | Sascha Schumann | Date: | Tue, 05 Jan 1999 21:06:38 +0000 |
| Subject: | WDDX | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-3298@lists.php.net to get a copy of this message | ||
Hi all,
I'm in the need of storing some data language independent in a database
and thought it would be a good idea to implement WDDX for PHP3 finally.
The serializer is already working, so you can do e.g.
$var = wddx_serialize(
array(
"test" => "abc",
"some value" => 5,
"another array" => array(1, 2, 3, "text"),
"another struct" => array(
"one" => "two",
"foo" => "bar"
)
)
);
and it will return (indented manually for your pleasure):
<wddxPacket version='0.9'><header/><data>
<struct>
<var name='test'>
<string>abc</string>
</var>
<var name='some value'>
<number>5.000000</number>
</var>
<var name='another array'>
<array length='4'>
<number>1.000000</number>
<number>2.000000</number>
<number>3.000000</number>
<string>text</string>
</array>
</var>
<var name='another struct'>
<struct>
<var name='one'>
<string>two</string>
</var>
<var name='foo'>
<string>bar</string>
</var>
</struct>
</var>
</struct>
</data></wddxPacket>
It's still not complete in regard to encoding binary strings, but it's
almost done.
I'm now looking for the Right Way to parse/deserialize strings. This
shouldn't be a big problem, but I haven't dealed with XML before.
Regards,
Sascha Schumann |
Consultant | finger sas@schell.de
| for PGP public key
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net