cancel
Showing results for 
Search instead for 
Did you mean: 

Reading XML in Mobile 7.1 for Handheld

Former Member
0 Kudos

Hello friends,

Right now we're developing handheld 7.1 applications, but we have troubles reading XML structures stored on the mobile minidb (local data base). If we try the application on the mobile client emulator (that comes with the NWDS) the application works fine, but when we try on a real mobile client (intermec device), the application crash just when the XML command lines are invoked.

The import libraries (used APIs) are:

import java.io.IOException;

import java.io.StringReader;

import java.util.*;

import javax.xml.parsers.DocumentBuilder;

import javax.xml.parsers.DocumentBuilderFactory;

import javax.xml.parsers.ParserConfigurationException;

import org.w3c.dom.Document;

import org.w3c.dom.Element;

import org.w3c.dom.Node;

import org.w3c.dom.NodeList;

import org.xml.sax.InputSource;

import org.xml.sax.SAXException;

We think the big problem is that the Creme VM and the Mobile Client don't have XML libs for this purpose because we search xml classes on the libs folder (for creme and for Mobile Client) and we did not found any xml related class.

The big questions are:

Is true that we don't have XML API for handhelds on mobile 7.1?

Is true that there is big difference betwen the libs used as default in the NWDS environment (develop environment) and the mobile client (the real mobile environment)?

Any help will be helpfull for us.

Regards,

David Faustini

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi all,

I found a reasonable solution. The CrEme VM and the Mobile Client don't have from factory settings the libraries needed for JAXP API manipulation. To solve this issue you have to include this libraries on your mobile platform. I'll write a blog for a detail solution.

Regards,

David Faustini

Former Member
0 Kudos

Hi David,

well, in short word yes and no!

Yes, Creme itself does not support XML handling. But the MI client has JAXP jar file included, giving you the necessary XML handling. On the other hand there are a few XML parsers available that can run in CREME JVM. Keep in mind, CREME has only some limited 1.1.8 functionality, even the latest version used by MI7.1 is not fully 1.3.1 compatible.

The Mobile client and the PC client are slightly different, yes, this is true as well.

Hope this helps to solve your issue.

Regards,

Oliver

Former Member
0 Kudos

Hi Oliver,

The JAXP documentation says that the libraries imported on my project are fine because I'm using the DOM parser. I did not find any jaxp.jar file located under my MI installation (lib folder). Could you help me with that?

And in more detail, could you tell me what imports should we use for read XML?

Thanks in advance,

David Faustini

Former Member
0 Kudos

Hi all,

I found a reasonable solution. The CrEme VM and the Mobile Client don't have from factory settings the libraries needed for JAXP API manipulation. To solve this issue you have to include this libraries on your mobile platform. I'll write a blog for a detail solution.

Regards,

David Faustini