Re: Read a XML document in COBOL




"Richard" <riplin@xxxxxxxxxxxx> wrote in message
news:1164394338.648474.306120@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

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:

<snipped very lengthy code>

I hope you use this as a component, Richard... :-)

Pete.


.



Relevant Pages

  • Re: COBOL and Java Relative Perceived Power
    ... have written their own COBOL compiler and it supports OO. ... isCOBOL is a COBOL ... PerCOBOL, on the other hand, is a means of converting COBOL code to ... Java with an intention of migrating away from COBOL. ...
    (comp.lang.cobol)
  • Re: COBOL and Java Relative Perceived Power
    ... isCOBOL have written ... COBOL development environment where you can develop COBOL objects as well ... PerCOBOL, on the other hand, is a means of converting COBOL code to Java ...
    (comp.lang.cobol)
  • Re: COBOL and Java Relative Perceived Power
    ... isCOBOL have written ... COBOL development environment where you can develop COBOL objects as well ... PerCOBOL, on the other hand, is a means of converting COBOL code to Java ...
    (comp.lang.cobol)
  • Re: Cobol vs. Images
    ... I'm working on porting an Document Image Management system to COBOL ... PerCOBOL generates to Java, so I guess I could use a Java library, ... Thanks for the link, Richard. ...
    (comp.lang.cobol)
  • Re: Cobol vs. Images
    ... I'm working on porting an Document Image Management system to COBOL ... using PerCOBOL. ...
    (comp.lang.cobol)