Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Document save_options of XmlEncoder #17418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion components/serializer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@ always as a collection.
changed by adding the ``\XML_COMMENT_NODE`` option to the ``XmlEncoder::ENCODER_IGNORED_NODE_TYPES``
key of the ``$defaultContext`` of the ``XmlEncoder`` constructor or
directly to the ``$context`` argument of the ``encode()`` method::

$xmlEncoder->encode($array, 'xml', [XmlEncoder::ENCODER_IGNORED_NODE_TYPES => [\XML_COMMENT_NODE]]);

The ``XmlEncoder`` Context Options
Expand Down Expand Up @@ -1124,6 +1124,7 @@ Option Description
``encoder_ignored_node_types`` Array of node types (`DOM XML_* constants`_) ``[]``
to be ignored while encoding
``load_options`` XML loading `options with libxml`_ ``\LIBXML_NONET | \LIBXML_NOBLANKS``
``save_options`` XML saving `options with libxml`_ ``0``
``remove_empty_tags`` If set to true, removes all empty tags in the ``false``
generated XML
============================== ================================================= ==========================
Expand Down