0
我試圖創建一個FileReader
(不是Document
)從XMLResponse
這樣的:從XMLResponse創建FileReader?
// Parse XML Response
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder db = factory.newDocumentBuilder();
InputSource inStream = new InputSource();
inStream.setCharacterStream(new StringReader(XMLResponse));
Document doc = db.parse(inStream);
但我不知道如何使用InputSource
創建?