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



Jack,

First of all, you are missing a slash between PurchaseOrders and purchaseOrderItem in your path= statement.

Secondly... your data structure needs to match the XML tag names you have in your document, but it does not.. The document has tags named 'Element', but the data structure has fields named po#, PickupDate, Response, etc.

RPG maps the names exactly. So it will map a tag named <Element> into a subfield of the data structure named 'Element'. It will never map a tag named 'Element' into a subfield named 'po#'.

I wonder if you're confused by the fact that your document has a "name" attribute? You might be thinking the name attribute is the same thing as the name of the XML tag? It is not...

Hmm.. maybe I'll code up an example...

-SK



On 4/25/2016 8:00 PM, Jack Tucky wrote:
Given the following XML, what should I use for the path option?
<PurchaseOrders> should repeat up to 99 times.

Is there a place where I can view an error log?

<VerifyPurchaseOrderResponse xmlns="http://retailer.com/webservices/";>
<VerifyPurchaseOrderResult>
<InquiryID>549790573</InquiryID>
<PurchaseOrders>
<PurchaseOrderItem>
<Element name="ORDER_NO" datatype="string">12316966</Element>
<Element name="PICKUP_DATE" datatype="datetime">4/21/2016 4:44:56
PM</Element>
<Element name="RESPONSE" datatype="string">Refuse</Element>
<Element name="REASON" datatype="string">PO Not on file</Element>
<Element name="PO_FOUND" datatype="string">N</Element>
<Element name="SUPPLIER_NUM" datatype="string"/>
<Element name="SPECIAL_VENDOR_IND" datatype="string"/>
<Element name="SUPPLIER" datatype="string"/>
<Element name="VENDOR_NAME" datatype="string"/>
<Element name="VENDOR_NUM" datatype="string"/>
<Element name="SUPPLIER_NAME" datatype="string"/>
<Element name="ALT_DATA_SOURCE" datatype="string">N</Element>
</PurchaseOrderItem>
</PurchaseOrders>
</VerifyPurchaseOrderResult>
</VerifyPurchaseOrderResponse>

I am getting an error that a variable doesn't match. Here is my complete
code.

http://code.midrange.com/453a93ea26.html



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.