2

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">

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!

2
  • Your another question missed the point of all replies that you've got to your first one. SQLite does not have an "XML data field". It has text fields, and it's up to you to interpret text inside the way you want. If you treat it as XML, then that's fine. And of course you can do anything that you can do with XML "with SQLite". Commented Aug 20, 2009 at 20:49
  • This is what happens when you move from Microsoft SQL Server to Sqlite. Commented Aug 20, 2009 at 20:52

3 Answers 3

6

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
        );
Sign up to request clarification or add additional context in comments.

Comments

0

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.

2 Comments

If I were a database, I'd draw the line at SNOBOL. Just saying.
+ for making me laugh hehehe :P
0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.