[Wolves] TXT to XML

sparkes sparkes at westmids.biz
Wed Nov 3 16:59:40 GMT 2004


Simon Burke wrote:

> 
> I can put my own stuff in whatever not a problem but its the rfcs et
> al that i need formatting, they are in plain ASCII format, and i want
> to make them look all nice and shiny with not necessarily XML but
> something that can be easily read in a browser and looks nice.
> 
I think the point Aq was making is that you are attempting to add 
formating where it currently does not exist.  This is one of the hardest 
jobs you can be asked to do but one that customers seem to think is 
trivial ;-)

It would only be a guess what the title is, the author is, which bits 
should be highlighted.  Do paragraphs have a newline (or 2 between them) 
or is it something to do with \t?

Unless the ascii text files have some standard structure it's impossible 
to make all these guesses.

If you have the struction in the text file it might as well be xml, 
sgml, tex, html, rest or something else already well used with libs to 
write and read from them.

It's not trivial to send xml to a browser and expect it to be styled. 
It's far easier to send html, even xhtml as the results are easier to 
predict on older and newer browsers.  So I would store in a format that 
allows you to store markup and metadata in the file and either display 
this file as is (if it's one that can be shown and styled as a webpage 
easily) or transform to one that can be used on request.

sparkes

-- 
<davee> "Sparkes, the Pete Best of LugRadio"



More information about the Wolves mailing list