views:

438

answers:

3

Is it possible to do this? The HTML files in question all conform to:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

EDIT: How would you store a number of HTML pages with sequential IDs associated with them in a database? (Oh, I'm new to databases).

EDIT: Now I realise there is no "xml" datatype for SQlite. I had a wrong datasource open!

A: 

I don't see why not. If you store it in the database as a string, the database shouldn't care whether that string is plain text, XML, or SNOBOL.

Thom Smith
If I were a database, I'd draw the line at SNOBOL. Just saying.
Mark Rushakoff
+ for making me laugh hehehe :P
pageman
A: 

You should be able to, XHTML is a specialized subset of XML. However, if the XHTML is not compliant (it may work in a browser, but it may not really be XML), you may run into problems.

Dave Morgan
+3  A: 

Use the TEXT datatype. Sqlite doesn't care if your data is HTML or XML.

To store several HTML pages with a sequential number use a table like:

 CREATE TABLE pages
        (ID integer  AUTO_INCREMENT PRIMARY KEY,
        html TEXT
        );
wierob