jkiwzztn wrote:
>Hi, I was thinking about trying the Pull parsing so I wrote a simple
>app but I keep getting the error message saying that no valid class
>found ( the message is shown below) What did I do wrong?
>
>Exception in thread "main" org.xmlpull.v1.XmlPullParserException: No
>valid parse
>r classes found in parameter classNames to newInstance() that
>contained 'org.xml
>pull.v1.XmlPullParserFactory'
> at org.xmlpull.v1.XmlPullParserFactory.newPullParser
>(XmlPullParserFactor
>y.java:175)
> at tryPull.main(tryPull.java:14)
>
>
>Below is the app code
>=======================
>import java.io.*;
>
>import org.xmlpull.v1.XmlPullParser;
>import org.xmlpull.v1.XmlPullParserException;
>import org.xmlpull.v1.XmlPullParserFactory;
>
>class tryPull {
> public static void main(String argv[]) throws Exception
> {
> XmlPullParserFactory factory =
>XmlPullParserFactory.newInstance(
> "org.xmlpull.v1.XmlPullParserFactory", null);
>
>
please follow online docs
(http://www.xmlpull.org/v1/download/unpacked/doc/quick_intro.html) and
make sure to use a constant not actual class name then make sure you
have a parser that implements XmlPull API on your classpath. for example
download xpp3-1.1.3.4.O.jar from [1] and put on your CLASSPATH and it
should work
HTH,
alek
[1] http://www.extreme.indiana.edu/dist/java-repository/xpp3/jars/
> factory.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES,
>true);
>
> XmlPullParser xpp = factory.newPullParser();
> }
>}
>
>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
--
The best way to predict the future is to invent it - Alan Kay