Source for file serializeWithAttributes2.php
Documentation is available at serializeWithAttributes2.php
* This example demonstrates, how XML_Serializer is able
* to serialize predefined values as the attributes of a tag
* @author Stephan Schmidt <schst@php.net>
require_once 'XML/Serializer.php';
"defaultTagName" => "unnamedItem",
"scalarAsAttributes" => false ,
"attributesArray" => '_attributes',
"contentName" => '_content'
'_attributes' => array ( 'version' => '1.0', 'foo' => 'bar' ),
'schst' => 'Stephan Schmidt'
$xml = $serializer->getSerializedData ();
Documentation generated on Mon, 11 Mar 2019 14:13:45 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|