Source for file serializeWithAttributes.php
Documentation is available at serializeWithAttributes.php
* This example demonstrates, how XML_Serializer is able
* to serialize scalar values as an attribute instead of a nested tag.
* The same structure like in serializeObject.php is serialized.
* @author Stephan Schmidt <schst@php.net>
require_once 'XML/Serializer.php';
// this is just to get a nested object
$pearError = PEAR ::raiseError ('This is just an error object',123 );
$foo->value = 'My value';
$foo->error = $pearError;
$xml = $serializer->getSerializedData ();
Documentation generated on Mon, 11 Mar 2019 15:41:41 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|