×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
This is my first attempt at reading xml using RPG & I am missing
something. Below is some of the xml document, not the entire file, & my
program that I am trying to display for now the values. It displays
blanks for both fields.
Being the first time we have ever used XML it seems pretty straight
forward, but we are confused why this not displaying the values. Once we
figure out this simple part, then we have to wrap our heads around tags
that repeat....
Thanks in advance
Steve
- <BODS xmlns="
http://www.xxxx">
- <BOD>
- <PurchaseOrder>
- <PurchaseOrderHeader>
<DocumentPurposeCode>00</DocumentPurposeCode>
- <DocumentID>
<ID>100932360</ID>
</DocumentID>
</PurchaseOrder>
</BOD>
</BODS>
d PurchaseOrder ds Qualified
d PurchaseOrderHeader...
d LikeDS(PurchaseOrderHeader_t)
d PurchaseOrderHeader_t...
d ds Qualified
d based(Template)
d DocumentPurposeCode...
d 2a
d DocumentID LikeDS(DocumentID_t)
d DocumentID_t ds Qualified
d based(Template)
d ID 10a
d XML_Source S 256a Varying
d
Inz('/QNTC/HPIA/g/SteveTest.xml')
D Options s 100a varying
/Free
Options = 'doc=file +
Path=BODS/BOD +
case=any +
allowextra=yes +
allowmissing=yes';
XML-INTO PurchaseOrder %XML(XML_Source: Options);
dsply PurchaseOrder.PurchaseOrderHeader.DocumentPurposeCode;
dsply PurchaseOrder.PurchaseOrderHeader.DocumentID.ID;
*inlr = *on;
/End-Free
As an Amazon Associate we earn from qualifying purchases.