libSBML Perl API  libSBML 5.12.0 Perl API
MathML.cpp File Reference

Utilities for reading and writing MathML to/from text strings. More...

Include dependency graph for MathML.cpp:

Functions

ASTNode_treadMathMLFromString (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. More...
 
ASTNode_treadMathMLFromStringWithNamespaces (const char *xml, XMLNamespaces_t *xmlns)
 Reads the MathML from the given XML string, constructs a corresponding abstract syntax tree, and returns a pointer to the root of the tree. More...
 
std::string writeMathMLToStdString (const ASTNode *node)
 
char * writeMathMLToString (const ASTNode *node)
 

Detailed Description

Utilities for reading and writing MathML to/from text strings.

Author
Ben Bornstein

Function Documentation

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
xmla 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.
ASTNode_t* readMathMLFromStringWithNamespaces ( const char *  xml,
XMLNamespaces_t xmlns 
)

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
xmla string containing a full MathML expression
xmlnsan XMLNamespaces object containing namespaces that are considered active during the read. (For example, an SBML Level 3 package namespace.)
Returns
the root of an AST corresponding to the given mathematical expression, otherwise NULL is returned if the given string is NULL or invalid.
std::string writeMathMLToStdString ( const ASTNode node)
char* writeMathMLToString ( const ASTNode node)