@@ -880,9 +880,9 @@ The ``XmlEncoder`` encodes this object as follows:
880
880
881
881
The array keys beginning with ``@ `` are considered XML attributes::
882
882
883
- $encoder = new XmlEncoder( );
884
- $encoder->encode(array('foo' => array('@bar' => 'value')));
885
- // will return :
883
+ array('foo' => array('@bar' => 'value') );
884
+
885
+ // is encoded as follows :
886
886
// <?xml version="1.0"?>
887
887
// <response>
888
888
// <foo bar="value" />
@@ -986,34 +986,45 @@ the type of the property is ``int``, an :class:`Symfony\\Component\\Serializer\\
986
986
will be thrown.
987
987
=======
988
988
989
+ =======
990
+
991
+ >>>>>>> Minor rewords
989
992
Context
990
993
~~~~~~~
991
994
992
- The XmlEncoder ``encode() `` method defines a third optional parameter called
993
- `` context `` to define some configuration options for the XmlEncoder::
995
+ The ``encode() `` method defines a third optional parameter called `` context ``
996
+ which defines the configuration options for the XmlEncoder an associative array ::
994
997
995
998
$xmlEncoder->encode($array, 'xml', $context);
996
999
997
1000
These are the options available:
1001
+ <<<<<<< HEAD
998
1002
1003
+ =======
1004
+
1005
+ >>>>>>> Minor rewords
999
1006
``xml_format_output ``
1000
- If set to true, format the output XML with line breaks and indentation.
1007
+ If set to true, formats the generated XML with line breaks and indentation.
1001
1008
1002
1009
``xml_version ``
1003
- Change the XML version attribute.
1010
+ Sets the XML version attribute (default: `` 1.1 ``) .
1004
1011
1005
1012
``xml_encoding ``
1006
- Change the XML encoding attribute.
1013
+ Sets the XML encoding attribute (default: `` utf-8 ``) .
1007
1014
1008
1015
``xml_standalone ``
1009
- Add standalone attribute in XML output .
1016
+ Adds standalone attribute in the generated XML (default: `` true ``) .
1010
1017
1011
1018
``xml_root_node_name ``
1012
- Change the root node name (default: ``response ``).
1019
+ Sets the root node name (default: ``response ``).
1013
1020
1014
1021
``remove_empty_tags ``
1022
+ <<<<<<< HEAD
1015
1023
If set to true, remove all empty tags in the XML output.
1016
1024
>>>>>>> Minor syntax issues and some rewordings
1025
+ =======
1026
+ If set to true, removes all empty tags in the generated XML.
1027
+ >>>>>>> Minor rewords
1017
1028
1018
1029
Learn more
1019
1030
----------
0 commit comments