Hello Team,
How can I read below XML in a temp table? I tried below code to get code and description but did not work.
DEFINE TEMP-TABLE SupplierMasterResponse
FIELD tt-code AS CHARACTER XML-NODE-NAME "ns1:Code"
FIELD tt-desc AS CHARACTER XML-NODE-NAME "ns1escription".
TEMP-TABLE SupplierMasterResponse:READ-XML("LONGCHAR",cResponse,"empty",?,?,?,?).
How can I read below XML in a temp table? I tried below code to get code and description but did not work.
DEFINE TEMP-TABLE SupplierMasterResponse
FIELD tt-code AS CHARACTER XML-NODE-NAME "ns1:Code"
FIELD tt-desc AS CHARACTER XML-NODE-NAME "ns1escription".
TEMP-TABLE SupplierMasterResponse:READ-XML("LONGCHAR",cResponse,"empty",?,?,?,?).
XML:
<ns0:SupplierMasterResponse xmlns:ns0="http://1" xmlns:ns1="http://www./v1">
<!-- The following element is optional. -->
<ns0:ResponseMetaData>
<!-- The following element is optional. -->
<ns2:Version xmlns:ns2="http:/v1">nonNegativeInteger-value</ns2:Version>
<!-- The following element is optional. -->
<ns2:SourceID>string-value</ns2:SourceID>
<!-- The following element is optional. -->
<ns2:UserID>string-value</ns2:UserID>
<!-- The following element is optional. -->
<ns2:ProgramID>string-value</ns2:ProgramID>
<!-- The following element is optional. -->
<ns2:MessageID>string-value</ns2:MessageID>
<!-- The following element is optional. -->
<ns2:Environment>string-value</ns2:Environment>
<!-- The following element is optional. -->
<ns2:ResponseTimeStamp>dateTime-value</ns2:ResponseTimeStamp>
</ns0:ResponseMetaData>
<ns1:Status>
<!-- The following element is optional. -->
<ns1:Code name="string-value">normalizedString-value</ns1:Code>
<!-- The following element is optional. -->
<ns1:Description>string-value</ns1:Description>
<!-- The following element is optional. -->
<ns1:ReasonCode name="string-value">normalizedString-value</ns1:ReasonCode>
</ns1:Status>
<!-- The following element may occur 0 or more times. -->
<ns0:SupplierMstrExceptionDetail>
<ns1:ID type="normalizedString-value">normalizedString-value</ns1:ID>
<ns1:ReasonCode name="string-value">normalizedString-value</ns1:ReasonCode>
<ns1:Reason>string-value</ns1:Reason>
</ns0:SupplierMstrExceptionDetail>
</ns0:SupplierMasterResponse>