I am currently reading an XML file with a PHP script (as shown below) that works fine, however now I would like to add some form of HTTP timeout to extract the XML.
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder(); Document doc = docBuilder.parse("http://www.mywebsite.com/returnsXML");
Can this be added to my current approach, or do I need to somehow modify the request to support timeouts?
source share