File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -1099,9 +1099,7 @@ always as a collection.
1099
1099
1100
1100
.. note ::
1101
1101
1102
- You may need to add some attributes on the root node. This can be done this way :
1103
-
1104
- .. code-block :: php
1102
+ You may need to add some attributes on the root node::
1105
1103
1106
1104
$encoder = new XmlEncoder();
1107
1105
$encoder->encode([
@@ -1110,16 +1108,11 @@ always as a collection.
1110
1108
'#' => ['foo' => ['@bar' => 'value', '#' => 'baz']]
1111
1109
], 'xml');
1112
1110
1113
- This will generate the following XML :
1114
-
1115
- .. code-block :: xml
1116
-
1117
- <?xml version =" 1.0" ?>
1118
- <response attribute1 =" foo" attribute2 =" bar" >
1119
- <foo bar =" value" >
1120
- baz
1121
- </foo >
1122
- </response >
1111
+ // will return:
1112
+ // <?xml version="1.0"?>
1113
+ // <response attribute1="foo" attribute2="bar">
1114
+ // <foo bar="value">baz</foo>
1115
+ // </response>
1123
1116
1124
1117
.. tip ::
1125
1118
You can’t perform that action at this time.
0 commit comments