XML parse file from HTTP

前端 未结 6 1547
广开言路
广开言路 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:46

    A little more detail, based on laz answer:

    String urlString = "http://example.com/test.xml";
    URL url = new URL(urlString);
    Document doc = builder.parse(url);
    

提交回复
热议问题