Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I parse an XML file using COBOL?

Status
Not open for further replies.

dcomer

MIS
Mar 13, 2001
1
0
0
US
Anyone with experience/tips for parsing large XML files using COBOL? Any vendor recommendations?

Thanks!!
 
Hi,

perhaps you can make an example of the output you expect from any XML input.

XML is just text..... It is not difficult to process it. I only don't know how long the line-length can be. Perhaps it is not limited. I didn't find specifications for that just like HTML. That means that you need a binairy approach of the file or a very, very, very long record definition that will not be exceeded, say something like 64000.

To make it easy for you to create an example of the output, here an example of the input:

Code:
        <family>
           <father>
              <name>Jim_Keohane</name>
              <height>79</height>
           </father>
           <mother>
              <name>Rae_Keohane</name>
              <height>61</height>
           </mother>
           <daughter>
              <name>Jo_Keohane</name>
              <height>65</height>
           </daughter>
           <daughter>
              <name>Meg_Keohane</name>
              <height>65</height>
           </daughter>
        </family>

Regards,

Crox

 
My company has a &quot;technology preview&quot; available for use with RM/COBOL. Both import and export of XML documents are supported, in what we hope is a COBOL-friendly manner. We are using the feedback from this preview to determine our commercial response.

If you are already an RM/COBOL user, you may request the technology preview from sales at no cost. You may find a sales link appropriate to your country on our web site.

k5tm
Liant Software Corporation
 
The COBOL compiler in use was not identified in the original post. There are several plug-ins that may help with your challenge. An article by Harry M. Sneed &quot;COBOL and XML A Perfect Marriage&quot; back in November 20, 2000 highlighted information about the use of XML with COBOL; the article was reprinted by COBOL Report at
The LegacyJ PERCobol compiler supports reading XML as COBOL data. While the document is product specific, it might you with some good general information. The &quot;XML Guide&quot; in PDF can be accessed at hopefully this may provide a little assistance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top