fbergmann / libSEDML

SED-ML library based on libSBML
BSD 2-Clause "Simplified" License
9 stars 12 forks source link

libSEDML not writing out XML declarations #103

Closed luciansmith closed 3 years ago

luciansmith commented 3 years ago

Somehow, from this python command:

sedstr = sedml.toSed()

Doesn't write out the XML declaration. Am I using the wrong function?

fbergmann commented 3 years ago

indeed it is not, we could add a boolean indicating that you want an xml declaration. (the tosed is just a function from sedbase, that serializes every element to xmlstream). we could make an overload for the document to always include the xml declaration if needed.

luciansmith commented 3 years ago

I found the 'toSed' function before I found the actual writer, but I have now found the actual writer. It.. might be nice to have 'toSed' on the document include the XML declaration? I guess it depends on if you think other people might find 'toSed' first like I did.

fbergmann commented 3 years ago

i'll leave it as it is ... as i mostly need the toSed without the declarations, and we have writeTo(std)string and stuff