Source for file serializeSelectiveAttributes.php
Documentation is available at serializeSelectiveAttributes.php
* This shows that XML_Serializer is able to work with
* @author Stephan Schmidt <schst@php.net>
require_once 'XML/Serializer.php';
array ('name' => 'Superman', 'age' => 34 , 'realname' => 'Clark Kent'),
array ('name' => 'Batman', 'age' => 32 , 'realname' => 'Bruce Wayne'),
'villain' => array ('name' => 'Professor Zoom', 'age' => 'unknown', 'realname' => 'Hunter Zolomon')
echo "Default behaviour:\n";
echo "XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES = true:\n";
'hero' => array ('name', 'age'),
'villain' => array ('realname')
echo "XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES is an array:\n";
Documentation generated on Mon, 11 Mar 2019 15:41:41 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|