2
我想用以下代碼解析XML,但StringReader在BlackBerry JDE中不可用。什麼是正確的方法來做到這一點?在BlackBerry上解析XML字符串
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
InputSource is = new InputSource();
is.setCharacterStream(new StringReader(xmlRecords));
Document doc = db.parse(is);