我正在寻找一个可以将 MathML 转换为中缀和中缀为 MathML 的 C/C++ 库,例如:
<?xml version="1.0" encoding="UTF-8"?>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<times/>
<cn type="integer"> 2 </cn>
<ci> x </ci>
</apply>
</math>
该库会将 mathml 转换为 2*x。或者给定 x+sin (t) 我得到以下 mathml
<?xml version="1.0" encoding="UTF-8"?>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<plus/>
<ci> x </ci>
<apply>
<sin/>
<ci> t </ci>
</apply>
</apply>
</math>
我知道如何编写这样的库,但如果可能的话,我宁愿不重新发明轮子。不能使用 Java,因为我必须能够将库链接到非托管代码。