Source for file serializeWithTagMap.php
Documentation is available at serializeWithTagMap.php
* This example demonstrates, how XML_Serializer is able
* to serialize scalar values as an attribute instead of a nested tag.
* In this example tags with more than one attribute become
* multiline tags, as each attribute gets written to a
* separate line as 'indentAttributes' is set to '_auto'.
* @author Stephan Schmidt <schst@php.net>
require_once 'XML/Serializer.php';
'description' => 'This is some text....',
'link' => 'http://foobar.com'
'link' => 'http://foobar.com'
$xml = $serializer->getSerializedData ();
$result = $serializer->serialize($data, $newOptions);
$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.
|