Guest User

Untitled

a guest
Jul 19th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. URLConnection connection = (HttpURLConnection) url.openConnection();
  2. connection.connect();
  3.  
  4. SAXParserFactory spf = SAXParserFactory.newInstance();
  5. SAXParser sp = spf.newSAXParser();
  6. XMLReader xr = sp.getXMLReader();
  7.  
  8. URLParser responseParser = new URLParser();
  9. xr.setContentHandler(responseParser);
  10. xr.parse(new InputSource(url.openStream()));
Add Comment
Please, Sign In to add comment