[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Do I need XML parser ?

  • To: "Razvan MIHAIU" <mihaiu@m...>
  • Subject: RE: Do I need XML parser ?
  • From: "Saha Rabindra N" <saha.rn@m...>
  • Date: Thu, 10 Mar 2005 13:08:10 -0500
  • Cc: <xml-dev@l...>
  • Disposition-notification-to: "Saha Rabindra N" <saha.rn@m...>
  • Importance: normal
  • Priority: normal
  • Thread-index: AcUg4Ydsw9MkPDZHSBqwfU4x4pCMtgEuonDw
  • Thread-topic: Do I need XML parser ?

unix xml parser
Hi Razvan,
 Can you please tell me whethere I can use Expat parser (written in C) to parse one datafile and then convert that to one XML file (in Unix env)? or expat is meant only for reading/parsing an existing XML file ?

Thanks in advance,

Regards
Rabindra Nath Saha


-----Original Message-----
From: Razvan MIHAIU [mailto:mihaiu@m...]
Sent: Friday, March 04, 2005 12:41 PM
To: Saha Rabindra N
Cc: xml-dev@l...
Subject: Re:  Do I need XML parser ?


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 XML Spy - 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
 
The information contained in this e-mail may be confidential and is intended solely for the use of the named addressee.
Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorized.
If you are not the intended recipient please notify us immediately by returning the e-mail to the originator.(A)

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.