W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2007

Creating a HTML document

From: Samuel <samuel@socal.rr.com>
Date: Sat, 21 Jul 2007 23:07:03 -0700
Message-ID: <00e301c7cc26$86c094e0$c2b5574c@samsystem>
To: <www-dom@w3.org>

I just need to create a couple of HTML files. I just need the files, outside
a browser and such. I know how to create XML files using the DOM, but I
cannot find examples of creating HTML files. I know I could create a XML
file and then transform that to HTML, and I will do that if I don't find the
direct solution. I also could create the file by simply writing text to a
file, but I won't do that.

Since the requirement is so general, it is difficult for me to search for
answers. If someone can tell me where there is an article explaining what I
need to do, then I will read that. I don't need all the details. Sample code
using JavaScript should be enough.

I am actually developing my program using Microsoft Visual C++ in a console
program. Their implementation of the DOM is frustrating. I hope that if I
have something that shows and/or explains how to do what I need to do using
the standard that I can match that with the Windows implementation. I hope.

I have gotten to the point where a file is created with the following
record, but only this record. If I know what DOM objects and functions I
need to use to create the HTML, HEAD and BODY tags, then I should be able to
figure out the rest.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
Received on Monday, 23 July 2007 23:36:02 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:13 UTC