You are here: Re: text to html conversion « HTML « IT news, forums, messages
Re: text to html conversion

Posted by Andy Dingley on 11/18/05 01:30

On 17 Nov 2005 12:51:49 -0800, "Yashwant" <yash.blizz@gmail.com> wrote:

>I want some information and documentation about how to convert text to
>html using java?

1) What are you trying to do ? A one-off conversion, with maybe an
update every few weeks or is this a continuing dynamic task ?

2) Why Java ? There are lots of techniques out there, don't tie
yourself into a particular one before you're forced to.

3) What is "text" ? Is this simply plain text? Does it have paragraph
breaks in it (such as a blank line)? Or does it have some attempt at
full formatting in it?


If this was a one-off, then I'd probably do it with Perl because it's
simple and convenient. In the simplest case you just need to write out a
standard header and footer (probably best to read this from a template
file) and then insert the text file into the middle of it. You use Perl
rather than SSI because there's probably a regex in there that
recognises a blank line and turns it into </p><p> markup.

If it's a dynamic case, then look at what you can get hosted on the
server you need to use. This is more likely to be PHP than Java and the
problem is so trivial that you could do it with any server-side
scripting tool.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация