[SoapRMI] Xpp/MxP1 Comment handling

Jean-Paul FINNE JPF_at_dvectors.com
Thu, 12 Jun 2003 11:01:01 +0200


Hi,

I have a problem parsing comments containing >	(gt)
For example:
<a>
<!-- 
<b>
</b>
 -->
</a>

When I parse it with the following code:
XmlPullParserFactory fac = XmlPullParserFactory.newInstance("org.xmlpull.mxp1.MXParser", Thread.currentThread().getContextClassLoader().getClass().getClass() );
XmlPullParser p = fac.newPullParser();
p.setInput(new StringReader(xml));
for (int type =  type = p.nextToken() ; type != XmlPullParser.END_DOCUMENT; type = p.nextToken()) {
        switch (type) {
        case XmlPullParser.COMMENT:
          System.out.println(p.getText());
          break;
       }
}
I obtain:
<b
</b

The greater than characters are lost !

Is it a bug in my code or in the parser ?

Greetings,
Jean-Paul