Mark,
Thanks for your quick reply. I tried to add <math> tag
into the xml file, but still got the same exception. I
am not sure if I wrote the right DOCTYPE, or it does
not matter.
--- Mark Hale <mj_hale@...> wrote:
> I suspect its because your XML is not valid. It is
> missing a <math> root element.
>
>
> --- stoneofjava <stoneofjava@...> wrote:
>
> > <?xml version="1.0"?>
> > <!DOCTYPE html PUBLIC
> > "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
> > "http://www.w3.org/TR/MathML2/dtd/mathml2.dtd">
> >
> > <apply>
> > <power/>
> > <apply>
> > <plus/>
> > <ci> x </ci>
> > <ci> y </ci>
> > </apply>
> > <cn>2</cn>
> > </apply>
> >
> > // Problem.java
> >
> > import JSci.io.*;
> >
> > public class Problem{
> >
> > public Problem(){
> > MathMLParser parser = new MathMLParser();
> > try {
> > parser.parse("message.xml");
> >
> > } catch(Exception e) {
> > e.printStackTrace();
> > }
> >
> > Object parseList[] =
> > parser.translateToJSciObjects();
> >
> > for( int i=0; i<parseList.length; i++)
> > {
> > System.out.println("***");
> > }
> > }
> >
> > public static void main(String[] args){
> > Problem p = new Problem();
> > }
> > }
> >
> >
> > Any body can give me some help?
> >
> >
> > Thanks,
> >
> > Jarry
> >
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> > jsci-unsubscribe@yahoogroups.com
> >
> >
> >
> >
> >
>
>
>
>
>
___________________________________________________________
>
> How much free photo storage do you get? Store your
> holiday
> snaps for FREE with Yahoo! Photos
> http://uk.photos.yahoo.com
>
____________________________________________________
Yahoo! Sports
Rekindle the Rivalries. Sign up for Fantasy Football
http://football.fantasysports.yahoo.com