Skip to content
Prev 169217 / 398506 Next

How to import HTML and SQL files

Arup <arup.pramanik27 <at> gmail.com> writes:
Also confused. HTML and SQL are like apples and bugs.

For HTML (assume you want to extract stock quotes from a site)

-- If you have strict XHTML, using package XML might be
   the best choice, but I doubt you get these nowadays.
-- Otherwise, read in the file and use regular expressions (grep, 
   gsub) to parse.

For SQL: SELECT * from mybase

-- "Importing" that string does not help very much, this is 
   a program telling you what to do when you know your database.
-- You might have a look at package RODBC or RSQLite; details depend on 
   the database you are going to use.

Dieter