Hi, everyone,

I use DOM to parser XML in Android 2.2.1(galaxy tab p1010), the code as 
following,

docBuilderFactory = DocumentBuilderFactory.newInstance();
docBuilder = docBuilderFactory.newDocumentBuilder();
doc = docBuilder.parse(content); //new File("E:/test.xml")

Element values = doc.getDocumentElement();
NodeList tokenList = values.getElementsByTagName("Token");

Node token = tokenList.item(0);
NodeList subTokenList = token.getChildNodes();

It is worked perfectly. But when install the apk on android 3.0(moto xoom), it 
is in exception.

When I debug it, I found after run the line “Element values = 
doc.getDocumentElement();”, the values is null.

How to resolve it?

THX

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to