Re: Read a XML document in COBOL
- From: "Pete Dashwood" <dashwood@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 25 Nov 2006 12:57:45 +1300
"Richard" <riplin@xxxxxxxxxxxx> wrote in message
news:1164394338.648474.306120@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
<snipped very lengthy code>
olivierdeman@xxxxxxxxx wrote:
I'm trying to read an XML document (see at the end of the page) in
COBOL (I'm using PerCobol). First I tried to read it doing this:
perform until einde = 1
display "|||"lijn"|||"
UNSTRING lijn DELIMITED BY '>' INTO
root
END-UNSTRING
MOVE root(2:2) TO rootTemp
UNSTRING root DELIMITED BY '<' INTO
vuller,element
END-UNSTRING
It's no where near as easy as that. You need to use a proper parser.
Given it is PerCobol you should be able to use a Java parser. However
if you want to do it in Cobol you may like to start with one that I
pulled off the net and tidied up a bit:
I hope you use this as a component, Richard... :-)
Pete.
.
- Follow-Ups:
- Re: Read a XML document in COBOL
- From: Richard
- Re: Read a XML document in COBOL
- References:
- Read a XML document in COBOL
- From: olivierdeman
- Re: Read a XML document in COBOL
- From: Richard
- Read a XML document in COBOL
- Prev by Date: Re: Read a XML document in COBOL
- Next by Date: Re: cobolc
- Previous by thread: Re: Read a XML document in COBOL
- Next by thread: Re: Read a XML document in COBOL
- Index(es):
Relevant Pages
|