can someone recommend an editor which is capable of converting a
simple text file into a xml file ?
Cheers,
hssig
hssig wrote:
> Hi,
>
> can someone recommend an editor which is capable of converting a
> simple text file into a xml file ?
I am not familiar with editors doing that but XSLT 2.0 can use the
functions unparsed-text to read in text files and the function tokenize
and the instruction analyze-string to extract data and can then output XML.
Of course you would need to post a small but representative sample of
the plain text you have and the corresponding XML you want to create.
--
Martin Honnen
http://msmvps.com/blogs/martin_honnen/
Emacs with psgml-mode and xxml-mode (or nxml-mode) should be able to
help. You can use REs to detect patterns and apply markup to the
paragraph level first (while remaining non-well-formed) and then add in
sufficient containment to suit your needs.
But I would echo Martin's advice: we would need to see what you mean by
"a simple text file" :-)
///Peter
I should have added that the standard text utilities are also usable for
this. awk and perl in particular would be good for matching patterns and
surrounding text with tags according to rules you write.
///Peter