Skip to content

Commit 56114b9

Browse files
committed
Fixed the code of an XmlEncoder example
1 parent 0f94f96 commit 56114b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/serializer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ The ``XmlEncoder`` will encode this object like that::
714714
Be aware that this encoder will consider keys beginning with ``@`` as attributes::
715715

716716
$encoder = new XmlEncoder();
717-
$encoder->encode(array('foo' => array('@bar' => 'value')));
717+
$encoder->encode(array('foo' => array('@bar' => 'value')), 'xml');
718718
// will return:
719719
// <?xml version="1.0"?>
720720
// <response>

0 commit comments

Comments
 (0)