<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<p>im actually interested in comparing two OpenMath-Objects with each other in terms of equality (despite being build a bit differently in XML) by using Java.</p>

<p>For example I want "x^2+2x-35=0" to be equal to "-35+2x+x^2=0".</p>

<p>So im wondering if there is a way to achieve this. I at least understand OpenMath as some sort of tree structure and thought there might be a way to compare them.</p>

<p>I already tried writing the expressions for those two equations, but ended up with no luck or good idea.</p>

<pre><strong><code>Equation 1: x^2+2x-35=0</code></strong><em><code>
<OMOBJ xmlns='http://www.openmath.org/OpenMath' version='2.0' cdbase='http://www.openmath.org/cd'>
    <OMA>
        <OMS cd='relation1' name='eq'/>
        <OMA>
            <OMS cd='arith1' name='minus'/>
            <OMA>
                <OMS cd='arith1' name='plus'/>
                <OMA>
                    <OMS cd='arith1' name='power'/>
                    <OMV name='x'/>
                    <OMI>
                        2
                    </OMI>
                </OMA>
                <OMA style='invisible'>
                    <OMS cd='arith1' name='times'/>
                    <OMI>
                        2
                    </OMI>
                    <OMV name='x'/>
                </OMA>
            </OMA>
            <OMI>
                35
            </OMI>
        </OMA>
        <OMI>
            0
        </OMI>
    </OMA>
</OMOBJ>

</code></em><strong><code>Equation 2: -35+2x+x^2</code></strong><em><code>
<OMOBJ xmlns='http://www.openmath.org/OpenMath' version='2.0' cdbase='http://www.openmath.org/cd'>
    <OMA>
        <OMS cd='relation1' name='eq'/>
        <OMA>
            <OMS cd='arith1' name='plus'/>
            <OMA>
                <OMS cd='arith1' name='unary_minus'/>
                <OMI>
                    35
                </OMI>
            </OMA>
            <OMA style='invisible'>
                <OMS cd='arith1' name='times'/>
                <OMI>
                    2
                </OMI>
                <OMV name='x'/>
            </OMA>
            <OMA>
                <OMS cd='arith1' name='power'/>
                <OMV name='x'/>
                <OMI>
                    2
                </OMI>
            </OMA>
        </OMA>
        <OMI>
            0
        </OMI>
    </OMA>
</OMOBJ></code></em></pre>

<p>Thank you for your time</p>

<p>Sincerely</p>

<p>Phu</p>
</div></div></body></html>