0

I would like to read some html using matlab. I've already tried urlread but got the url read error

Getting data into MATLAB from HTTPS:

so i tried using java with this:

Handling an invalid security certificate using MATLAB's urlread command.

unfortunately i don't know how to use java with matlab. so i tried this code and it seems to work

  url = 'https://stackoverflow.com/questions/11053664/use-java-in-matlab';
  is = java.net.URL([], url ).openConnection().getInputStream(); 
  br = java.io.BufferedReader(java.io.InputStreamReader(is));
  str = char(br.readLine());

however i would like to get the whole html page. so i can use regexp. My kingdom for some help

Community
  • 1
  • 1
DJJ
  • 2,481
  • 2
  • 28
  • 53
  • 1
    regex? on html? down that path [lies madness](http://stackoverflow.com/a/1732454/118068). – Marc B Feb 17 '13 at 22:14

1 Answers1

0

There is a function in matlab that does that... The name is urlread!

See http://www.mathworks.com/matlabcentral/answers/973

DanielTheRocketMan
  • 3,199
  • 5
  • 36
  • 65
  • Not exactly what i was looking for but this also helps. In fact the latest version of matlab solves the problem. Many thanks – DJJ Jul 16 '13 at 08:03