how to get the xpp object ?

On Feb 4, 3:29 am, Nicholas Albion <[email protected]> wrote:
> If you determine that the problem is that the XML (or HTML!) is badly
> formatted and you have no control over it, you can do something like:
>
> int n;
> while( (n = xpp.getNext()) != END_DOCUMENT ) {
>   try {
>      // do your parsing element-by-element
>   } catch( org.xmlpull.v1.XmlPullParserException e ) {} // ignore the
> exception
>   } catch( Throwable e ) {
>      log.warning("error while parsing file: " + e.getMessage();  //
> you may want to catch any other exceptions and do something about them
>   }
>
> }
>
> It might not be the most efficient practice to perform the try/catch
> within the loop, but if somebody else is sending you dodgy XML there
> might not be anything you can do.

-- 
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