import javax.xml.xpath cannot be resolved
I can't use the different imports
import javax.xml.xpath.XPath;
import开发者_运维技巧 javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
I use android 1.5
How can i solve the problem?
Android 1.5 does not support XPath. Only Android 2.2 and up do. Here is the docs page. The minimum Android API level for XPath is 8, which is Android 2.2 . So you're either going to have to find another way to parse XML (SAX runs on ALL Android versions) or update your project to 2.2. Here are the stats to about how many users are there for each Android version. The majority is Android 2.2
XPath was introduced in SDK 8(2.2). http://developer.android.com/reference/javax/xml/xpath/package-summary.html
Upgrade your SDK and use it.
精彩评论