You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just started with jsonix in my project. I succesfully created a mapping from an xsd and I am able to create a marshalDocument.
But whether I use marshalString or marshalDocument, there is no xml declaration (eg. <?xml version="1.0" encoding="UTF-8"?>) present in the generated xml.
I've searched github and stackoverflow, but I'm unable to find an answer on how to add a xml declaration using jsonix.
The text was updated successfully, but these errors were encountered:
stefanschenk
changed the title
How to add xml declaration to marshalDocument
[question] How to add xml declaration to marshalDocument
Feb 8, 2018
To be honest, I do not know how to do this. Jsonix uses XMLSerializer.serializeToString or node.xml to serialize DOM to string (see Jsonix.DOM.serialize). So I guess XML declaration is not supported yet.
As a workaround you could try to serialize DOM on your own or simply prepend XML declaration to the serialized string.
Hi,
I just started with jsonix in my project. I succesfully created a mapping from an xsd and I am able to create a marshalDocument.
But whether I use marshalString or marshalDocument, there is no xml declaration (eg.
<?xml version="1.0" encoding="UTF-8"?>
) present in the generated xml.I've searched github and stackoverflow, but I'm unable to find an answer on how to add a xml declaration using jsonix.
The text was updated successfully, but these errors were encountered: