libSBML Perl API  libSBML 5.10.0 Perl API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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...
 
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.
Examples:
createExampleSBML.cpp, translateL3Math.cpp, and translateMath.cpp.
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
xmlnsa XMLNamespaces_t object containing namespaces that are considered active during the read e.g. an L3 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.
char* writeMathMLToString ( const ASTNode node)