Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
426
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. import org.w3c.dom.NodeList;
  2. import org.xml.sax.SAXException;
  3.  
  4. import javax.xml.parsers.ParserConfigurationException;
  5. import java.io.IOException;
  6.  
  7. /**
  8. * @author Tommie Lindberg (c15tlg@cs.umu.se)
  9. * @version 20/11/2017.
  10. */
  11. public class dom_test {
  12.  
  13. public static void main(String[] args){
  14. try {
  15. Parse_dom dom = new Parse_dom();
  16. NodeList channels = dom.parse("http://api.sr.se/api/v2/channels?liveaudiotemplateid=1&audioquality=hi&pagination=false");
  17. dom.grabElement(channels);
  18. } catch (ParserConfigurationException e) {
  19. e.printStackTrace();
  20. } catch (SAXException e) {
  21. e.printStackTrace();
  22. } catch (IOException e) {
  23. e.printStackTrace();
  24. }
  25.  
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement