You need to sign in to do that
Don't have an account?
Reading in a URL for parsing
So far in my apex playing time I have been able to parse out values from a string of characters
private void testBookParser() { XmlStreamReaderDemo demo = new XmlStreamReaderDemo(); String str = '<books><book author="Manoj">Foo bar</book>' + '<book author="Mysti">Baz</book></books>'; XmlStreamReader reader = new XmlStreamReader(str); books = demo.parseBooks(reader); //System.debug(books.size()); //for (Book book : books) {System.debug(book); //} }
However, syntatically how can I read in a URL string which contains XML (eg. 'https://na6.salesforce.com/servlet/servlet.ReportList') so that I can parse it?
Any help would be appreciated!
From the Documentation: