hi,

I am parsing xml file to wbxml using kxml parser but while parsing back the wbxml file to xml file, I getting the error

java.io.IOException: Curr. only CP0 supported
at org.kxml.wap.WbxmlParser.peek(+302)
at org.kxml.kdom.Node.parse(+6)
at org.kxml.kdom.Document.parse(+5)
at XMLtoWBXML.getXMLStream(XMLtoWBXML.java:115)
at XMLtoWBXML.startApp(XMLtoWBXML.java:67)
at javax.microedition.midlet.MIDletProxy.startApp(MIDletProxy.java:44)
at com.sun.midp.midlet.Scheduler.schedule(Scheduler.java:375)
at com.sun.midp.main.Main.runLocalClass(Main.java:477)
at com.sun.midp.main.Main.main(Main.java:130)

xml file that i am parsing is:

<?xml version="1.0" encoding="utf-8"?>
<Sync xmlns="AirSync:" xmlns:A="POOMCONTACTS:">
<Collections>
<Collection>
<Class>Contacts</Class>
<SyncKey>{6A374473-D63E-45FA-8556-129C8C1C3CFA}11</SyncKey>
<Status>1</Status>
<Commands>
<Add>
<ServerId>rid:01c133474e27d04faba48d02078cf41d00000090e129
</ServerId>
<ApplicationData>
<A:FileAs>Mouse, Mickey</A:FileAs>
<A:FirstName>Mickey</A:FirstName>
<A:LastName>Mouse</A:LastName>
<A:BusinessPhoneNumber>(425) 555-1212</A:BusinessPhoneNumber>
</ApplicationData>
</Add>
</Commands>
</Collection>
</Collections>
</Sync>

the code which i am using for Parsing wbxml to xml:
public byte[] getXML( byte[] wbxmlData ) { // wbxml to xml
try {

ByteArrayInputStream in = new ByteArrayInputStream(wbxmlData);
AbstractXmlParser parser = new WbxmlParser(in);

Document document = new Document ();
document.parse(parser); (error pointing here)
in.close();
ByteArrayOutputStream out = new ByteArrayOutputStream();

XmlWriter writer = new XmlWriter(new OutputStreamWriter( out ) );
document.write(writer);
writer.close();

wbxmlData = out.toString().getBytes();
out.close();

}
catch(IOException ioe){
System.out.println(" in ioe: ");
ioe.printStackTrace();
}
catch (Exception e)
{e.printStackTrace();}
return wbxmlData;
}

also i want to parse data between the tags <ApplicationData>
<A:FileAs>Mouse, Mickey</A:FileAs>
<A:FirstName>Mickey</A:FirstName>
<A:LastName>Mouse</A:LastName>
<A:BusinessPhoneNumber>(425) 555-1212</A:BusinessPhoneNumber>
</ApplicationData>

where A is xml namespace.