XML_Serializer
Creates XML documents from PHP data structures like arrays, objects or scalars.
PHP versions 4 and 5
LICENSE: This source file is subject to version 3.0 of the PHP license that is available through the world-wide-web at the following URI: http://www.php.net/license/3_0.txt. If you did not receive a copy of the PHP License and are unable to obtain it through the web, please send a note to license@php.net so we can mail you a copy immediately.
Class | Description |
---|---|
![]() |
Creates XML documents from PHP data structures like arrays, objects or scalars. |
replace HTML entitites
do not replace entitites
replace all XML entitites
This setting will replace <, >, ", ' and &
replace only required XML entitites
This setting will replace <, " and &
error code for no serialization done
default mode
SimpleXML mode
When serializing indexed arrays, the key of the parent value is used as a tagname.
option: all values in this key will be treated as attributes
Possible values:
option: attribute for class (only if typeHints => true)
Possible values:
option: attribute where original key is stored
Possible values:
option: attribute for type (only if typeHints => true)
Possible values:
option: whether to use cdata sections for character data
Possible values:
option: use classname for objects in indexed arrays
Possible values:
option: this value will be used in a comment, instead of creating a new tag
Possible values:
option: this value will be used directly as content, instead of creating a new tag, may only be used in conjuction with attributesArray
Possible values:
option: default name for tags
Possible values:
option: supply a string or an array with id and uri ({@see XML_Util::getDoctypeDeclaration()}
Possible values:
option: add a doctype declaration
Possible values:
option: function that will be applied before serializing
Possible values:
option: type of entities to replace
Possible values:
option: whether to ignore properties that are set to null
Possible values:
option: string used for indentation
Possible values:
option: indent the attributes, if set to '_auto', it will indent attributes so they all start at the same column
Possible values:
option: string used for linebreaks
Possible values:
option: use 'simplexml' to use parent name as tagname if transforming an indexed array
Possible values:
option: function that will be applied before serializing
Possible values:
option: prepend string for attributes
Possible values:
option: whether to return the result of the serialization from serialize()
Possible values:
option: attributes of the root tag
Possible values:
option: name of the root tag
Possible values:
option: scalar values (strings, ints,..) will be serialized as attribute
Possible values:
option: tag names that will be changed
Possible values:
option: enable type hints
Possible values:
option: add an XML declaration
Possible values:
option: encoding of the document
Possible values:
Documentation generated on Mon, 04 Dec 2006 11:09:55 -0500 by phpDocumentor 1.3.0RC3