Generating an empty XML node with attribute. #203
-
Hello everybody, Result need for example:
It is possible to achieve this result with this library, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Just add attributes as you would do normally: (new Spatie\ArrayToXml\ArrayToXml([
'Header' => [
'_attributes' => [
'messageId' => '123abc-cba',
'isTest' => 'false',
//.......
],
],
]))->prettify()->toXml(); |
Beta Was this translation helpful? Give feedback.
-
Hello everybody, |
Beta Was this translation helpful? Give feedback.
Just add attributes as you would do normally: