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

Appearance settings

Commit dc01b87

Browse filesBrowse files
Reword
1 parent 8d99047 commit dc01b87
Copy full SHA for dc01b87

File tree

1 file changed

+5
-17
lines changed
Filter options

1 file changed

+5
-17
lines changed

‎components/serializer.rst

Copy file name to clipboardExpand all lines: components/serializer.rst
+5-17Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -706,24 +706,12 @@ always as a collection.
706706

707707
.. tip::
708708

709-
Processing of XML comments can be controlled with the third constructor
710-
argument:
709+
XML comments are ignored by default when decoding contents, but this
710+
behavior can be changed with the optional ``$ignoredNodeTypes`` argument of
711+
the ``XmlEncoder`` class constructor.
711712

712-
.. code-block:: php
713-
714-
class XmlEncoder
715-
{
716-
public function __construct(
717-
string $rootNodeName = 'response',
718-
int $loadOptions = null,
719-
array $ignoredNodeTypes = array(XML_PI_NODE, XML_COMMENT_NODE)
720-
) {
721-
// ...
722-
}
723-
}
724-
725-
.. versionadded:: 4.1
726-
XML comments are removed by default since Symfony 4.1.
713+
.. versionadded:: 4.1
714+
XML comments are ignored by default starting from Symfony 4.1.
727715

728716
The ``YamlEncoder``
729717
~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.