Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5e23045

Browse files
committed
Minor tweaks
1 parentadbc7b2 commit5e23045

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

‎components/serializer.rst‎

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -860,8 +860,6 @@ you indicate that you're expecting an array instead of a single object.
860860
The ``XmlEncoder``
861861
------------------
862862

863-
This encoder transforms arrays into XML and vice versa.
864-
865863
This encoder transforms arrays into XML and vice versa. For example, take an
866864
object normalized as following::
867865

@@ -888,34 +886,33 @@ The array keys beginning with ``@`` are considered XML attributes::
888886
// <foo bar="value" />
889887
// </response>
890888

891-
Contex
892-
~~~~~~
893-
894-
The context param is an array of additional options for the XmlEncoder.
889+
Context
890+
~~~~~~~
895891

896-
It must be defined while calling the XmlEncoder encode() method::
892+
The ``encode()`` method defines a third optional parameter called ``context``
893+
which defines the configuration options for the XmlEncoder an associative array::
897894

898895
$xmlEncoder->encode($array, 'xml', $context);
899896

900-
**Available params:**
897+
These are the options available:
901898

902899
``xml_format_output``
903-
If set to true,format theoutput XML with linebreak and indentation
900+
If set to true,formats thegenerated XML with linebreaks and indentation.
904901

905902
``xml_version``
906-
Change the XML version attribute
903+
Sets the XML version attribute (default: ``1.1``).
907904

908905
``xml_encoding``
909-
Change the XML encoding attribute
906+
Sets the XML encoding attribute (default: ``utf-8``).
910907

911908
``xml_standalone``
912-
Add standalone attribute in XMLoutput
909+
Adds standalone attribute inthe generatedXML(default: ``true``).
913910

914911
``xml_root_node_name``
915-
Change the root node name (default: response)
912+
Sets the root node name (default:``response``).
916913

917914
``remove_empty_tags``
918-
If set to true,remove all empty tags in theXML output
915+
If set to true,removes all empty tags in thegenerated XML.
919916

920917
Recursive Denormalization and Type Safety
921918
-----------------------------------------

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp