read html nodes in r

I need toget a set of vector from the the internet which is available in html format.

I'm reading the webpage this way:

add=url
doc=htmlTreeParse(add)

This how doc looks:

doc $file [1] "http://ifis.iowafloodcenter.org/ifis/ifis5/ws/objects.php?id=741&type=4"

  $version
  [1] ""

  $children
  $children$html
  <html>
  <body>
  <p>743,762,754,759,761,744,741,755,758,742,757,716,760</p>
  </body>
 </html>


  attr(,"class")
 [1] "HTMLDocument"

I wish to obtain numbers under

as vector.

I tried using :

xmlValue(xmlRoot(doc) )

But this does not give me vector.

How can it be done?

Thank you for reading

Answers


Here is it:

getURL(add,encoding = "iso8859-8") 
v2=strsplit(v, "\\,")
as.numeric(v2[[1]][[2]])

Try using

 `getURL(add)`        

from RCurl package


Need Your Help

Where are meteor's installed packages located?

javascript twitter-bootstrap meteor meteorite

I installed twitter bootstrap using meteor add bootstrap. I want to look at the bootstrap css files, but I can't find them anywhere.

Unable Response.Redirect(url); with many query arguments

asp.net redirect query-string sitecore

The '&amp;' that separates query string arguments is getting encoded no mater what I do.