views:

97

answers:

1

I know how to create InputSource out of Reader but how to go the other way?

I'm capturing org.xml.sax.InputSource and now want to feed it into org.xmlpull.v1.XmlPullParser. That one has few setInput methods but these only accept Reader or InputStream as an argument. What would be the best way to convert InputSource into one of these?

A: 

Silly me

XmlPullParser xpp = factory.newPullParser();
xpp.setInput(is.getCharacterStream());

Where "is" is InputSource

DroidIn.net