× 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.



It looks like </PurchaseOrderHeader> is missing.

Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx

-----rpg400-l-bounces@xxxxxxxxxxxx wrote: -----
To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
From: sjones@xxxxxxxxxxxxxx
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
Date: 11/23/2010 01:09PM
Subject: Re: XML help

No errors on the XML-INTO  The slashes are ok, I made a very simple xml
document & was able to read it.

Steve Jones





Re: XML help

dmosley
to:
RPG programming on the IBM i/System i
11/23/2010 12:21 PM


Sent by:
rpg400-l-bounces@xxxxxxxxxxxx
Please respond to RPG programming on the IBM i / System i






Scratch that.  Not case-sesitive?  Are you getting any errors, from the
XML-INTO?

Try flip your slashes..

Inz('/QNTC/HPIA/g/SteveTest.xml')

to

Inz('\QNTC\HPIA\g\SteveTest.xml')


David L. Mosley, Jr.
Technical Solutions Architect
Dancik International, Ltd.
2000 CentreGreen Way, Suite 250
Cary, NC 27513

www.dancik.com



sjones@xxxxxxxxxxxxxx
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
11/23/2010 11:05 AM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>


To
rpg400-l@xxxxxxxxxxxx
cc

Subject
XML help






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.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.