Converting MathML ASTNode to XML XMLNode

11 views
Skip to first unread message

Eliott Tixier

unread,
Aug 20, 2024, 3:54:28 AMAug 20
to sbml-discuss
Hi all,

I am looking for a way to convert a MathML `ASTNode` into an XML `XMLNode` and so far haven't found any method or function that does that in libsbml's C++ API.

My current hackish workaround consists in converting `ASTNode` to a string using `writeMathMLToString` and then create an XML text node from the string.

What would be the proper way of doing that?

Thanks again for maintaining this library!

This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice.

Frank Bergmann

unread,
Aug 20, 2024, 4:04:37 AMAug 20
to sbml-discuss
I'm afraid we are not directly creating XMLNodes when constructing the MathML, but instead we use an XMLOutputStream to directly serialize the node. The only functions you have available are given in [1]. 

Sorry for not having better news, 
best
Frank
Reply all
Reply to author
Forward
0 new messages