{"id":32153509,"url":"https://github.com/sciml/mathml.jl","last_synced_at":"2026-02-19T07:01:54.937Z","repository":{"id":38303645,"uuid":"346135827","full_name":"SciML/MathML.jl","owner":"SciML","description":"Julia MathML parser","archived":false,"fork":false,"pushed_at":"2025-12-30T19:52:36.000Z","size":277,"stargazers_count":26,"open_issues_count":4,"forks_count":10,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-01-01T13:06:19.692Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SciML.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"SciML"}},"created_at":"2021-03-09T20:30:10.000Z","updated_at":"2025-12-30T19:49:49.000Z","dependencies_parsed_at":"2024-04-12T12:22:54.196Z","dependency_job_id":"151103b8-ddc6-4c7f-b032-573ca880fc02","html_url":"https://github.com/SciML/MathML.jl","commit_stats":{"total_commits":98,"total_committers":17,"mean_commits":5.764705882352941,"dds":0.5408163265306123,"last_synced_commit":"42f7feba4461826b7a69aaf45ff0e114e9b20ed9"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/SciML/MathML.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SciML%2FMathML.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SciML%2FMathML.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SciML%2FMathML.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SciML%2FMathML.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SciML","download_url":"https://codeload.github.com/SciML/MathML.jl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SciML%2FMathML.jl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29605799,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T06:47:36.664Z","status":"ssl_error","status_checked_at":"2026-02-19T06:45:47.551Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-21T11:35:34.787Z","updated_at":"2026-02-19T07:01:54.931Z","avatar_url":"https://github.com/SciML.png","language":"Julia","funding_links":["https://github.com/sponsors/SciML"],"categories":[],"sub_categories":[],"readme":"# MathML\n\n[![Github Action CI](https://github.com/SciML/MathML.jl/workflows/CI/badge.svg)](https://github.com/SciML/MathML.jl/actions)\n[![Coverage Status](https://coveralls.io/repos/github/SciML/MathML.jl/badge.svg?branch=main)](https://coveralls.io/github/SciML/MathML.jl?branch=main)\n[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://SciML.github.io/MathML.jl/stable)\n[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://SciML.github.io/MathML.jl/dev)\n[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet)](https://github.com/SciML/ColPrac)\n\nA parser for the [MathML](https://en.wikipedia.org/wiki/MathML) XML standard.\n\nUses Symbolics.jl under the hood for defining equations and uses EzXML.jl for XML parsing.\n\nMathML Specification: https://www.w3.org/TR/MathML3/\n\n## Examples:\n```julia\nusing MathML, EzXML, Symbolics, AbstractTrees\nxml = xml\"\"\"\u003cmath xmlns=\"http://www.w3.org/1998/Math/MathML\"\u003e\n   \u003capply\u003e\n      \u003ctimes /\u003e\n      \u003cci\u003ecompartment\u003c/ci\u003e\n      \u003cci\u003ek1\u003c/ci\u003e\n      \u003cci\u003eS1\u003c/ci\u003e\n   \u003c/apply\u003e\n\u003c/math\u003e\"\"\"\n\nnum = parse_node(xml)\n# 1-element Vector{Num}:\n#  S1*compartment*k1\n\n# to pretty print the tree use `print_tree`\nprint_tree(xml)\n# math\n# └─ apply\n#    ├─ times\n#    ├─ ci\n#    ├─ ci\n#    └─ ci\n\n# you can also just go directly from EzXML.Document or String\nstr = \"\u003capply\u003e\u003cpower/\u003e\u003cci\u003ex\u003c/ci\u003e\u003ccn\u003e3\u003c/cn\u003e\u003c/apply\u003e\"\nMathML.parse_str(str)\n# x^3\n\n# derivatives also work!\nstr = \"\"\"\n\u003capply\u003e\u003cdiff/\u003e\n  \u003cbvar\u003e\u003cci\u003ex\u003c/ci\u003e\u003cdegree\u003e\u003ccn\u003e2\u003c/cn\u003e\u003c/degree\u003e\u003c/bvar\u003e\n  \u003capply\u003e\u003cpower/\u003e\u003cci\u003ex\u003c/ci\u003e\u003ccn\u003e4\u003c/cn\u003e\u003c/apply\u003e\n\u003c/apply\u003e\n\"\"\"\nexpand_derivatives(MathML.parse_str(str))\n# 12(x^2)\n\n# there is also a macro @MathML_str to directly call `parse_str`\nml = MathML\"\"\"\n\u003capply\u003e\u003cdiff/\u003e\n  \u003cbvar\u003e\u003cci\u003ex\u003c/ci\u003e\u003cdegree\u003e\u003ccn\u003e2\u003c/cn\u003e\u003c/degree\u003e\u003c/bvar\u003e\n  \u003capply\u003e\u003cpower/\u003e\u003cci\u003ex\u003c/ci\u003e\u003ccn\u003e4\u003c/cn\u003e\u003c/apply\u003e\n\u003c/apply\u003e\n\"\"\"\nexpand_derivatives(ml)\n# 12(x^2)\n```\n\nCheck the tests in `test/parse.jl` to see a more exhaustive list of what is covered.\n\n## TODO:\n* calculus:\n    - ivars fix, make ODESystem(parse_node(readxml(\"lorenz.xml\").root)) work\n    - partial derivatives `partialdiff` tags\n    - integration `int` tags - needs https://github.com/JuliaSymbolics/Symbolics.jl/issues/58\n        - often a var like dPidt is assigned to Differential(time)(Pi) where dPidt is referred to after this \\\u003ceq\u003e (I think solution is `Symbolics.diff2term`)\n    - `diff`s with no independent variable: like `\u003capply\u003e\u003cdiff/\u003e\u003cci\u003ef\u003c/ci\u003e\u003c/apply\u003e`\n\n## DONE:\n* nested apply\n* fix sep/ tags in cn, take `type` attribute into account\n    - rational, e-notation, complex, complex polar\n* basic diff handling\n* bound variables like bvar, might be lingering issues though\n* `eq` nodes sometimes needs to be ~ and sometimes needs to be =\n* fix `sep` tags in `ci`s, take `type` attribute into account\n* `piecewise` tags: make heaviside test work\n* fix undefined namespacing issues https://github.com/JuliaIO/EzXML.jl/issues/156\n    - parsets like SBML and CellMLToolkit should be handling\n* to_mathml: julia expr -\u003e mathml and Symbolics Num -\u003e mathml. round tripping\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsciml%2Fmathml.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsciml%2Fmathml.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsciml%2Fmathml.jl/lists"}