Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating HTML files. 1

Status
Not open for further replies.

intrepid101

Programmer
Aug 8, 2001
13
US
Are there any know sources that can help in using VB6 to create HTML files to be posted to a web site.
I am writing a program that will extract specific data from a Log file and I would like it to output an HTML file so the data can be viewed on a web site by those interested. I am sure it is as simple as writing the HTML code to a file and renaming to .html, but If anyone has some tips or useful info I would be grateful. :)

Thanks
Scott
 
That's what I do. It gets a bit messy, but is essentially easy. Peter Meachem
peter@accuflight.com
 
That's interesting. Not used xml myself, but it seems that the code is parsing an xml file and replacing strings in an html file with the xml data. Should be easy to replace the xml bits with text file bits. Without running the code, I cannot see how it can continuously replace the html strings so you end up with a table listing books rather than a book per page. Does it do that? Peter Meachem
peter@accuflight.com
 
Intrepid101 -

I'd do as Peter suggests -- just open the text file (named with a .html extension) and write to it. You could do something clever like define some constants for the various HTML elements.
[tt]
Public TAG_START_HTML = &quot;<HTML>&quot;
Public TAG_END_HTML = &quot;</HTML>&quot;

Public TAG_START_HEADING = &quot;<HEAD>&quot;
Public TAG_END_HEADING = &quot;</HEAD>&quot;

Public TAG_START_BODY = &quot;<BODY>&quot;
Public TAG_END_BODY = &quot;</BODY>&quot;

Public TAG_START_TABLE = &quot;<TABLE>&quot;
Public TAG_END_TABLE = &quot;</TABLE>&quot;

Public TAG_START_TABLEROW = &quot;<TR>&quot;
Public TAG_END_TABLEROW = &quot;</TR>&quot;

Public TAG_START_TABLECELL = &quot;<TD>&quot;
Public TAG_END_TABLECELL = &quot;</TD>&quot;
[/tt]

And so forth.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top