Page 1 of 1

Generating COBOL Structures with XML

PostPosted: Wed May 06, 2015 3:04 am
by Passager
Hello everybody,

How to generate an XML document with multiple namespaces prefixes ?, for example :

01 NIV-A
05 NIV-B PIC X(8) VALUE 'Valeur B'.
05 NIV-C PIC X(8) VALUE 'Valeur B'.
05 NIV-D PIC X(8) VALUE 'Valeur B'.

<prefix1:NIV-A>
<prefix1:NIV-B>Valeur B</prefix1:NIV-B>
<prefix1:NIV-C>Valeur C</prefix1:NIV-C>
<prefix2:NIV-D>Valeur D</prefix2:NIV-D>
</prefix1:NIV-A>

Thanks a lot for your help.

Re: Generating COBOL Structures with XML

PostPosted: Tue Jul 07, 2015 12:12 am
by jself
I'm looking for the same answer. Have you had any luck in figuring it out yet?

Re: Generating COBOL Structures with XML

PostPosted: Fri Jul 24, 2015 8:23 pm
by jself
If your trying to use the cobol xml generate statement and you want to use namespaces looks like you have to do the following.
Manualy code for the prefix. For ex: in your xml copy book in cobol use XXXNIV-A, XXXNIV-B, XXXNIV-C for prefix1 and YYYNIV-D for prefix2.
Once your xml is generated then use an inspect replacing statement to change XXXNIV to prefix1:NIV and YYYNIV to prefix2:NIV.

Re: Generating COBOL Structures with XML

PostPosted: Mon Feb 15, 2016 2:36 pm
by madooeiei
Thanks for the info.