 |
 |
 |
Saha Rabindra N wrote:
> Hello,
> As I am new to this XML business so I got a basic and simple question.
> Here it goes...
> I have one cobol data file (in ASCII format) and one cobol record description
file to describe the position/length of each field of data file.
>
> I want to generate one XML file out of that cobol data file. My question is
> 1) Do I need any XML parser to just generate one XML file from a data file ?
Or a simple programming logic can create the XML file ?
An XML parser does what its name suggests: parse an XML file. Your
input file is not XML so you do not need an XML parser in this scenario.
XML is just text: you can use programming logic (using the language
of your choice) or even a text editor. A text editor which allows you to
validate against a schema (like DTD, or XML Schema) will help but it is not
required. A text editor that I like is XMLSpy">XMLSpy - but this one is expensive.
> 2) While environment/programming language would be best in this scenario ?
> a) program written in cobol on Mainframe ?
> b) to transfer the datafile to a Unix m/c and the generate the XML
file in C language ?
> c) to transfer the datafile to a Unix m/c and the generate the XML
file using shell script ?
Obviously, you can use any of the above scenarios, but the best
thing would be to use the DOM to generate XML.
The Apache foundation has a good implementation of the DOM
recommendation - namely Xerces. Xerces is written in Java, C++ and Perl:
http://xml.apache.org/xerces2-j/
http://xml.apache.org/xerces-c/
http://xml.apache.org/xerces-p/
You will have to learn how to use the DOM interface:
http://www.troubleshooters.com/tpromag/200103/codexercises.htm
Regards,
Razvan
www.mihaiu.name
|
 | 

|  |
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.
|  |
| |
 |
 |
 |