public class Task1 {
public Task1(URL url) throws SAXException,
ParserConfigurationException, IOException {
// We create new instance of factory class
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
// We get new instance of DocumentBuilder using the factory class.
DocumentBuilder builder = factory.newDocumentBuilder();
// We utilize the DocumentBuilder to process an XML document
// and we get document model in form of W3C DOM
Document doc = builder.parse(url.toString());
}
}