Skip to content

Instantly share code, notes, and snippets.

@marekyggdrasil
Created June 18, 2018 03:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marekyggdrasil/3170a1cb5967ea4a82b6f2363ba2da95 to your computer and use it in GitHub Desktop.
Save marekyggdrasil/3170a1cb5967ea4a82b6f2363ba2da95 to your computer and use it in GitHub Desktop.
File that tests functionality of integral MathML parser for issue: https://github.com/allofphysicsgraph/graph/issues/7
from tools.ContentMathML import mml2sympy
from lxml import etree
xml = """
<apply>
<int/>
<bvar><ci>x</ci></bvar>
<lowlimit><cn>a</cn></lowlimit>
<uplimit><ci>b</ci></uplimit>
<apply>
<ci>f</ci>
<ci>x</ci>
</apply>
</apply>
"""
print mml2sympy(etree.XML(xml))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment