我知道如何在Reader之外创建InputSource,但是如何反过来做呢?
我正在捕获org.xml.sax.InputSource,现在想要将其提供给org.xmlpull.v1.XmlPullParser。其中一个有很少的setInput方法,但这些方法只接受Reader或InputStream作为参数。将InputSource转换为其中之一的最佳方式是什么?
发布于 2009-09-16 22:56:52
我真傻
XmlPullParser xpp = factory.newPullParser();
xpp.setInput(is.getCharacterStream());其中" is“是InputSource
https://stackoverflow.com/questions/1435886
复制相似问题