String verifyMathML ( String canMathML ) throws MathConverterException { try { Document tempDoc = XMLHelper . string2Doc ( canMathML , true ) ; Content content = scanFormulaNode ( ( Element ) tempDoc . getFirstChild ( ) ) ; //verify the formula if ( content == Content . mathml ) { return canMathML ; } else { throw new MathConverterException ( "could not verify produced mathml, content was: " + content . name ( ) ) ; } } catch ( Exception e ) { logger . error ( "could not verify mathml" , e ) ; throw new MathConverterException ( "could not verify mathml" ) ; } }
Just a quick scan over .