@@ -856,9 +856,9 @@ you indicate that you're expecting an array instead of a single object.
856
856
857
857
$data = ...; // The serialized data from the previous example
858
858
$persons = $serializer->deserialize($data, 'Acme\Person[]', 'json');
859
-
859
+
860
860
The ``XmlEncoder ``
861
- -----------------------
861
+ ------------------
862
862
863
863
This encoder transforms arrays into XML and vice versa.
864
864
@@ -884,34 +884,35 @@ Be aware that this encoder will consider keys beginning with ``@`` as attributes
884
884
// <response>
885
885
// <foo bar="value" />
886
886
// </response>
887
-
888
- Context
889
- ~~~~~~~~~~~~~~~
887
+
888
+ Contex
889
+ ~~~~~~
890
890
891
891
The context param is an array of additional options for the XmlEncoder.
892
- It must be defined in the call of XmlEncoder encode() method :
893
892
894
- $xmlEncoder->encode($array, 'xml', $context);
893
+ It must be defined while calling the XmlEncoder encode() method::
894
+
895
+ $xmlEncoder->encode($array, 'xml', $context);
895
896
896
897
**Available params : **
897
-
898
+
898
899
``xml_format_output ``
899
- If setted to true, format the output XML with line break and indentation
900
+ If set to true, format the output XML with line break and indentation
900
901
901
902
``xml_version ``
902
- Change the XML version attribute
903
+ Change the XML version attribute
903
904
904
905
``xml_encoding ``
905
- Change the XML encoding attribute
906
+ Change the XML encoding attribute
906
907
907
908
``xml_standalone ``
908
- Add standalone attribute in XML output
909
-
910
- ``remove_empty_tags ``
911
- If setted to true, remove all empty tags in the XML output
909
+ Add standalone attribute in XML output
912
910
913
911
``xml_root_node_name ``
914
- Change the root node name (default : response)
912
+ Change the root node name (default : response)
913
+
914
+ ``remove_empty_tags ``
915
+ If set to true, remove all empty tags in the XML output
915
916
916
917
Recursive Denormalization and Type Safety
917
918
-----------------------------------------
0 commit comments