避免错误引用预期属性解析Xml

时间:2015-03-26 14:14:47

标签: java xml

这是一种避免此错误的方法吗?

我用它来解析:

try {
            doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new URL(url).openStream());
        } catch (SAXException | IOException | ParserConfigurationException e) {

            e.printStackTrace();
        }

但我有错误:

[Fatal Error] :3:19: Open quote is expected for attribute "attr" associated with an  element type  "elem".

0 个答案:

没有答案