XML parse file from HTTP

前端 未结 6 1535
广开言路
广开言路 2020-12-14 04:13

I have an XML file located at a location such as

http://example.com/test.xml

I\'m trying to parse the XML file to use it in my program with

6条回答
  •  攒了一身酷
    2020-12-14 04:37

    File fileXml = new File(url);
    
    DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    Document document = parser.parse(fileXml);
    

    it should go

提交回复
热议问题