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

Commitadbc7b2

Browse files
committed
Minor rewords
1 parent2dc6ed3 commitadbc7b2

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

‎components/serializer.rst‎

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -880,9 +880,9 @@ The ``XmlEncoder`` encodes this object as follows:
880880
881881
The array keys beginning with ``@`` are considered XML attributes::
882882

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:
886886
// <?xml version="1.0"?>
887887
// <response>
888888
// <foo bar="value" />
@@ -986,34 +986,45 @@ the type of the property is ``int``, an :class:`Symfony\\Component\\Serializer\\
986986
will be thrown.
987987
=======
988988

989+
=======
990+
991+
>>>>>>> Minor rewords
989992
Context
990993
~~~~~~~
991994

992-
TheXmlEncoder``encode()`` method defines a third optional parameter called
993-
``context`` to define someconfiguration options for the XmlEncoder::
995+
The ``encode()`` method defines a third optional parameter called ``context``
996+
which defines theconfiguration options for the XmlEncoder an associative array::
994997

995998
$xmlEncoder->encode($array, 'xml', $context);
996999

9971000
These are the options available:
1001+
<<<<<<< HEAD
9981002

1003+
=======
1004+
1005+
>>>>>>> Minor rewords
9991006
``xml_format_output``
1000-
If set to true,format theoutput XML with line breaks and indentation.
1007+
If set to true,formats thegenerated XML with line breaks and indentation.
10011008

10021009
``xml_version``
1003-
Change the XML version attribute.
1010+
Sets the XML version attribute (default: ``1.1``).
10041011

10051012
``xml_encoding``
1006-
Change the XML encoding attribute.
1013+
Sets the XML encoding attribute (default: ``utf-8``).
10071014

10081015
``xml_standalone``
1009-
Add standalone attribute in XMLoutput.
1016+
Adds standalone attribute inthe generatedXML(default: ``true``).
10101017

10111018
``xml_root_node_name``
1012-
 Change the root node name (default: ``response``).
1019+
 Sets the root node name (default: ``response``).
10131020

10141021
``remove_empty_tags``
1022+
<<<<<<< HEAD
10151023
If set to true, remove all empty tags in the XML output.
10161024
>>>>>>> Minor syntax issues and some rewordings
1025+
=======
1026+
If set to true, removes all empty tags in the generated XML.
1027+
>>>>>>> Minor rewords
10171028

10181029
Learn more
10191030
----------

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp