[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: XMl parsing using XML-Into opcode on V5R4
Try to retrieve the XML-into error codes and show them here.
like this:
xml-into(e) freightbill
%XML(xmldata : 'case=any allowextra=yes +
allowmissing=yes');
if %error();
dsply %status();
endif;
xml-into(e) freightbillcommodities.freightbillcommodity
%XML(xmldata : 'case=any allowextra=yes +
allowmissing=yes path=freightbill/+
freightbillcommodities/freightbillcommodity');
if %error();
dsply %status();
endif;
-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Nilesh Jokhakar
Sent: Monday, July 13, 2009 10:00 PM
To: HTTPAPI and FTPAPI Projects
Subject: XMl parsing using XML-Into opcode on V5R4
I'm trying to use XML-into opcode on V5R4 machine and having a hard time in getting data in the data structure. Could anyone please shed some light on the issue? The xml-into works fine upto " freightbillcommodities. Freightbillcommodity" array but can't get remaining errors information in the data structure.
XML variable (xmldata) :
<freightbill
id = "0" Clientcode = "Sample" carriercode = "samplecar">
<freightbillcommodities>
<freightbillcommodity id="0" LineNumber="1" Description="IRON OR STEEL" Code="19160.10000000" Commodityid="0" FBClass="100" Weight="15000" Pieces="0">
<UIErrorsColl>
<CTLError>
<ErrorCode>FBVal</ErrorCode>
<Source>Commodity</Source>
<ErrorMessage>Unable to load commodity by code</ErrorMessage>
<ExtraMessage>19160.10000000</ExtraMessage>
<Fatal>true</Fatal>
</CTLError>
<CTLError>
<ErrorCode>FBVal</ErrorCode>
<Source>Commodity</Source>
<ErrorMessage>Unable to load commodity by code</ErrorMessage>
<ExtraMessage>19160.10000000</ExtraMessage>
<Fatal>true</Fatal>
</CTLError>
</UIErrorsColl>
</freightbillcommodity>
<freightbillcommodity id="1" LineNumber="2" Description="Hazmat Products" Code="20000.20000000" Commodityid="0" FBClass="100" Weight="15000" Pieces="0">
<UIErrorsColl>
<CTLError>
<ErrorCode>FBVal</ErrorCode>
<Source>Commodity</Source>
<ErrorMessage>Unable to load commodity by code</ErrorMessage>
<ExtraMessage>20000.20000000</ExtraMessage>
<Fatal>true</Fatal>
</CTLError>
<CTLError>
<ErrorCode>FBVal</ErrorCode>
<Source>Commodity</Source>
<ErrorMessage>Unable to load commodity by code</ErrorMessage>
<ExtraMessage>20000.20000000</ExtraMessage>
<Fatal>true</Fatal>
</CTLError>
</UIErrorsColl>
</freightbillcommodity>
</freightbillcommodities>
</freightbill>
RPG program
D freightbillcommodities...
D Ds Qualified
D freightbillcommodity...
D likeds(FrBlComm_t) dim(2)
D FrBlComm_t Ds Qualified
D id 5
D LineNumber 5
D Description 50
D Code 5
D Commodityid 5
D FBClass 5
D Weight 5
D Pieces 5
D UIErrorsColl likeds(FrBlUIerr_t) dim(2)
D FrBlUIerr_t Ds Qualified
D CtlError Likeds(FrBiErrd) dim(2)
D FrBiErrd Ds Qualified
D ErrorCode 5
D Source 5
D ErrorMessage 15
D ExtraMessage 15
D Fatal 5
xml-into freightbill
%XML(xmldata : 'case=any allowextra=yes +
allowmissing=yes');
xml-into freightbillcommodities.freightbillcommodity
%XML(xmldata : 'case=any allowextra=yes +
allowmissing=yes path=freightbill/+
freightbillcommodities/freightbillcommodity');
Debug version
EVAL freightbillcommodities
FREIGHTBILLCOMMODITIES.FREIGHTBILLCOMMODITY.ID(1) = '0 '
FREIGHTBILLCOMMODITIES.FREIGHTBILLCOMMODITY.LINENUMBER(1) = '1 '
FREIGHTBILLCOMMODITIES.FREIGHTBILLCOMMODITY.DESCRIPTION(1) =
'IRON OR STEEL, SEE NOTE, ITEM 19162: WEIGHING '
FREIGHTBILLCOMMODITIES.FREIGHTBILLCOMMODITY.CODE(1) = '19160'
FREIGHTBILLCOMMODITIES.FREIGHTBILLCOMMODITY.COMMODITYID(1) = '0 '
FREIGHTBILLCOMMODITIES.FREIGHTBILLCOMMODITY.FBCLASS(1) = '100 '
FREIGHTBILLCOMMODITIES.FREIGHTBILLCOMMODITY.WEIGHT(1) = '15000'
FREIGHTBILLCOMMODITIES.FREIGHTBILLCOMMODITY.PIECES(1) = '0 '
FREIGHTBILLCOMMODITIES.FREIGHTBILLCOMMODITY.UIERRORSCOLL.CTLERROR.ERRORCODE(1,1,1) =
' '
FREIGHTBILLCOMMODITIES.FREIGHTBILLCOMMODITY.UIERRORSCOLL.CTLERROR.SOURCE(1,1,1) =
' '
FREIGHTBILLCOMMODITIES.FREIGHTBILLCOMMODITY.UIERRORSCOLL.CTLERROR.ERRORMESSAGE(1,1,1) =
' '
FREIGHTBILLCOMMODITIES.FREIGHTBILLCOMMODITY.UIERRORSCOLL.CTLERROR.EXTRAMESSAGE(1,1,1) =
' '
FREIGHTBILLCOMMODITIES.FREIGHTBILLCOMMODITY.UIERRORSCOLL.CTLERROR.FATAL(1,1,1) =
' '
FREIGHTBILLCOMMODITIES.FREIGHTBILLCOMMODITY.UIERRORSCOLL.CTLERROR.ERRORCODE(1,1,2) =
' '
FREIGHTBILLCOMMODITIES.FREIGHTBILLCOMMODITY.UIERRORSCOLL.CTLERROR.SOURCE(1,1,2) =
' '
FREIGHTBILLCOMMODITIES.FREIGHTBILLCOMMODITY.UIERRORSCOLL.CTLERROR.ERRORMESSAGE(1,1,2) =
' '
FREIGHTBILLCOMMODITIES.FREIGHTBILLCOMMODITY.UIERRORSCOLL.CTLERROR.EXTRAMESSAGE(1,1,2) =
' '
LCOMMODITIES.FREIGHTBILLCOMMODITY.UIERRORSCOLL.CTLERROR.FATAL(1,1,2) =
'
===================================================
Fortis Bank disclaimer :
http://www.fortisbank.com/common/disclaimer.htm
Fortis Bank privacy policy:
http://www.fortisbank.com/common/privacy_policy.htm
===================================================
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------