Utilities for reading and writing MathML to/from text strings.
- Author
- Ben Bornstein
ASTNode_t* readMathMLFromString |
( |
const char * |
xml | ) |
|
Reads the MathML from the given XML string, constructs a corresponding abstract syntax tree, and returns a pointer to the root of the tree.
- Parameters
-
xml | a string containing a full MathML expression |
- Returns
- the root of an AST corresponding to the given mathematical expression, otherwise
NULL
is returned if the given string is NULL
or invalid.
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.
- Parameters
-
xml | the MathML to be converted, stored in a character string. |
- Returns
- an ASTnode (the root of the AST representing the mathematical formula in the given XML string), otherwise NULL is returned if the given string is NULL or invalid.