Newbie howto question.



I'm just learning how to program, so my question is probably elementary.
Apologies where appropriate.

I've got an ASCII text file (a GEDCOM file) comprised of many records of
tagged information. I've used an application to create a webpage for
each individual record, but now I want to add further information from
each record to the related web page. Each html filename is $GEDCOM_ID
with the '.html' suffix.

So far, I can open the GEDCOM file and identify a record, and then open
the related html file. I can identify the tagged information, extract
said info and write it to the html file, closing the html file before
going to the next record.

What I'm trying to figure out is an elegant way of inserting the
information into the correct place in the html file. All I can think to
do is read each html file into a buffer, testing for the relevant line,
then replace it with the revised line, and write the buffer back out
again, overwriting the file that was read in. What easier approach am I
missing?

I'm using ANSI C and wish to avoid any non-standard usages.

I considered asking in comp.lang.c, but I get the feeling my question
isn't appropriate there. Read this NG charter, decided this was an
algorithm matter, so posted here.

All comments and replies appreciated.

Thanks,

Longfellow

.



Relevant Pages

  • Re: CDhtmlDialog Charset Problem
    ... I am using CDhtmlDialog::LoadFromResourceto load this HTML file in ... the CDhtmlDialog dialog. ... Now the problem is that I am having some buffer in a char* variable ... But if I write some EUC-JP encoded string in the HTML file statically, ...
    (microsoft.public.vc.mfc)
  • CDhtmlDialog Charset Problem
    ... The HTML file's head portion is given below:- ... I am using CDhtmlDialog::LoadFromResourceto load this HTML file in ... the CDhtmlDialog dialog. ... Now the problem is that I am having some buffer in a char* variable ...
    (microsoft.public.vc.mfc)
  • CDhtmlDialog Charset Problem
    ... The HTML file's head portion is given below:- ... I am using CDhtmlDialog::LoadFromResourceto load this HTML file in ... the CDhtmlDialog dialog. ... Now the problem is that I am having some buffer in a char* variable ...
    (microsoft.public.vc.mfc)
  • CDhtmlDialog Charset Issue
    ... The HTML file's head portion is given below:- ... I am using CDhtmlDialog::LoadFromResourceto load this HTML file in ... the CDhtmlDialog dialog. ... Now the problem is that I am having some buffer in a char* variable ...
    (microsoft.public.vc.mfc)
  • CDhtmlDialog Charset Problem
    ... The HTML file's head portion is given below:- ... I am using CDhtmlDialog::LoadFromResourceto load this HTML file in ... the CDhtmlDialog dialog. ... Now the problem is that I am having some buffer in a char* variable ...
    (microsoft.public.vc.mfc)