Hi.
I'm almost getting it working.
The generation of XML works fine.
The parsing works mostly fine.
However, I do have a problem with numeric values containing decimals:  '325.25' ends up like 325.00 in the receiving field when I use 
'compute NUMFIELD        = function numval-c(XML-TEXT)'
NUMFIELD is pic 9(5)v99.
Am I using the wrong function?  It works ok with numeric fields without decimals.
Mvh. / Regards / Terveisin
Geir 
-----Original Message-----
From: cobol400-l-bounces@xxxxxxxxxxxx [mailto:cobol400-l-bounces@xxxxxxxxxxxx] On Behalf Of Vries, Frans de
Sent: Friday, October 11, 2013 9:36 AM
To: 'COBOL Programming on the IBM i (AS/400 and iSeries)'
Subject: Re: [COBOL400-L] XML using COBOL(RPG)?
Hi There,
Yes, there is... in ILE Cobol there are two statements, one for generating and one for parsing:
Xml generate xmlPO from purchaseOrder count in numChars
XML PARSE FILE-STREAM xml-id PROCESSING PROCEDURE xml-handler
              ON EXCEPTION
                 display 'XML document error ' XML-CODE
              NOT ON EXCEPTION
               display 'XML document successfully parsed'
           END-XML.
See for more info and details :
http://pic.dhe.ibm.com/infocenter/iseries/v6r1m0/index.jsp
Met vriendelijke groet,
Frans de Vries.
============================================================
F. de Vries | Detailresult Groep N.V. | Leeghwaterweg 11 - 1951 NA  Velsen-Noord | Postbus 86 - 1940 AB  Beverwijk Bedrijfsondersteunende systemen & Rapportage | Detailresult ICT | tel: +31 (0)251-279220 | www.Dirk.nl I www.Dekamarkt.nl I www.Detailresult.nl I e-mail: fdvries@xxxxxxxxxxxxxxx
-----Oorspronkelijk bericht-----
Van: cobol400-l-bounces@xxxxxxxxxxxx [mailto:cobol400-l-bounces@xxxxxxxxxxxx] Namens geir.kildal@xxxxxxxxxx
Verzonden: vrijdag 11 oktober 2013 9:16
Aan: cobol400-l@xxxxxxxxxxxx
Onderwerp: [COBOL400-L] XML using COBOL(RPG)?
Hi.
I'm in need of a practical solution for producing and parsing XML-files in my Cobol(Rpg) environment.  
It is not very complicated structures, more lik flat files on XML-format.
Are there any simple and quick solutions to this, anyone?
I know this has been posted earlier, but I'd like to see if there are some news here.
Geir Kildal,
Nordea Bank
Norway 
 
--
This is the COBOL Programming on the IBM i (AS/400 and iSeries) (COBOL400-L) mailing list To post a message email: COBOL400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: 
http://lists.midrange.com/mailman/listinfo/cobol400-l
or email: COBOL400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at 
http://archive.midrange.com/cobol400-l.
--
This is the COBOL Programming on the IBM i (AS/400 and iSeries) (COBOL400-L) mailing list To post a message email: COBOL400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: 
http://lists.midrange.com/mailman/listinfo/cobol400-l
or email: COBOL400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at 
http://archive.midrange.com/cobol400-l.
As an Amazon Associate we earn from qualifying purchases.