Java / Pocket PC Xml Parsing


I am developing a CDC/Personal Profile 1.0 application which is to run on Pocket PC 2003. I need to parse xml. For that i am using kxml.

The JVM i am using is CrE-ME 4.1

I used the follwing code to parse xml (tried from the string as well as from file).

XmlParser parser = null ;
String xml =  "<channel><item><title>Reader</title><link></link><description>Reader are used to read tag information</description></item></channel>" ;
 Reader reader = new StringReader(xml) ;
      parser = new XmlParser(reader);
catch(Exception ex)
     //log error to file.

//log message: xml doc loaded.

But after this line is hit "parser = new XmlParser(reader);", there is no exception being thrown nor any code after that is executing.

I tried putting the kxml jar in the Creme's lib folder, but the result is the same.

Thanks in advance
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Don't you have to call parser.parse()?
prashant_itAuthor Commented:

No. i am using the following code after that "parser = new XmlParser(reader);"

ParseEvent pe = null;
parser.skip();, null, "channel");    
pe =;
Think it should be more like

pe =, null, "channel");    
String text = pe.getText();
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

prashant_itAuthor Commented:
I am using pe.getText() to read.

But the problem is after the line "parser = new XmlParser(reader);" no code is executing. I checked it by giving some logging comments.
Also no exception is being thrown.
prashant_itAuthor Commented:

I found the solution to the problem.

Actually the kxml i had downloaded form the site was in .zip format.
I renamed it to .jar and it worked.

Please tell me how to get my points refunded.

>>Actually the kxml i had downloaded form the site was in .zip format.

How did you compile it then?
PAQed with points refunded (50)

Community Support Moderator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.