×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Looking at the docs....

Assuming your XML character variable is named XMLDATA, you should have

xml-into output %XML(xmldata : 'doc=string');

Charles

On Wed, May 25, 2016 at 9:42 AM, Smith, Mike <Mike_Smith@xxxxxxxxxxxxxxxx>
wrote:

I have never had occasion to process xml before, so this is completely new
to me. I don't think that the way I'm being asked to get and parse the
data is the norm.
I found an article http://www.itjungle.com/fhg/fhg080415-story01.html
example (XMLINTOB1) that has code that appears to do something similar to
I what I want to do, but I'm not having any luck.

I am reading a file on SQL SERVER from an ESRI table.
It appears that there is a field that contains XML data.
I have read the file and loaded the data into a character field.

When I run the XML-INTO I get an error code of 302 which says that the xml
document was not an external file. Which of course its not.

Below is a snippet of data . I'm not sure if it is the complete contents
of the field, but hopefully it is enough to indicate what I'm looking at.
<GPCodedValueDomain2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xs="http://www.w3.org/2001/XMLSchema"; xmlns:typens="
http://www.esri.com/schemas/ArcGIS/10.1";
xsi:type="typens:GPCodedValueDomain2"><DomainName>Pipe Casing
Reason</DomainName><FieldType>esriFieldTypeString</FieldType><MergePolicy>esriMPTDefaultValue</MergePolicy><SplitPolicy>esriSPTDuplicate</SplitPolicy><Description
/><Owner>DBO</Owner><CodedValues
xsi:type="typens:ArrayOfCodedValue"><CodedValue
xsi:type="typens:CodedValue"><Name>Highway</Name><Code
xsi:type="xs:string">Highway</Code></CodedValue><CodedValue
xsi:type="typens:CodedValue"><Name>Railroad</Name><Code
xsi:type="xs:string">Railroad</Code></CodedValue><CodedValue
xsi:type="typens:CodedValue"><Name>Street</Name><Code
xsi:type="xs:string">Street</Code></CodedValue><CodedValue
xsi:type="typens:CodedValue"><Name>Water</Name><Code
xsi:type="xs:string">Water</Code></CodedValue></CodedValues></GPCodedValueDomain2>


Can I process the xml from a field? If so, what is causing the 302
error?
Any guidance on how to accomplish this is appreciated.


Mike

NOTICE: This message, including any attachment, is intended as a
confidential and privileged communication. If you have received this
message in error, or are not the named recipient(s), please immediately
notify the sender and delete this message.
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2026 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.