Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Create XML file from text file [Thread Next] Re: Create XML file from text fileTo: NULL Date: 1/5/2006 11:35:00 AM matofarides@g... wrote: > Hello all! > > I was wondering whether there was a way, using any XML parser > (preferably xerces), to create an XML file by reading, line by line a > text file. Generally not, since an XML parse, by definition, parses XML and plain text is not XML. What I've done in such situations is to write a parser for the source language (whatever kind of language is in the text file) using tools like lex and yacc (and the Java equivalents) and write simple production rules to generate meaningful XML. From there, you can use XSLT to further process the file contents, and *that* is where an XML parser can be useful. Ed | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
