|
libSBML C++ API
5.8.0
|
Utilities for reading and writing MathML to/from text strings.
Functions | |
| ASTNode_t * | readMathMLFromString (const char *xml) |
| Reads MathML from a text string containing XML and returns the corresponding AST representation of the mathematical formula. | |
| char * | writeMathMLToString (const ASTNode *node) |
| Writes the given ASTNode (and its children) as MathML to a string, and returns the string. | |
| ASTNode_t* readMathMLFromString | ( | const char * | xml | ) |
Reads MathML from a text string containing XML and returns the corresponding AST representation of the mathematical formula.
Reads the MathML from the given XML string, constructs a corresponding abstract syntax tree, and returns a pointer to the root of the tree.
The content given as the string xml should be a complete, self-contained MathML formula, enclosed by <math xmlns="http://www.w3.org/1998/Math/MathML"> and </math> tags.
| xml | the MathML to be converted, stored in a character string. |
| char* writeMathMLToString | ( | const ASTNode * | node | ) |
Writes the given ASTNode (and its children) as MathML to a string, and returns the string.
| node | the AST to be converted to MathML |
free()) when it is no longer needed.