I want to parse an XML file stored on a remote server. Can I use the DOM for the same without downloading the file?

Surendra Chauhan

You can use the DOM to parse the XML file without downloading the file from the remote server. But you have to use the URL to access the file. Here is sample code.

    DOMParser parser = new DOMParser();
    URL url = createURL(remotefile);
    // Obtain the document.
    XMLDocument doc = parser.getDocument();
0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact