|
D ESRIDS ds
D XML 32767A varying
Boy, that doesn't seem to match what the text of the message tells me.--
Message . . . . : The XML parser detected error code 302.
Cause . . . . . : While parsing an XML document for an RPG procedure, the
parser detected an error at offset 0 with reason code 302. The actual
document is *N; *N indicates that the XML document was not an external file.
Recovery . . . : Contact the person responsible for program maintenance to
determine the cause of the problem.
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
Jose Perez
Sent: Wednesday, May 25, 2016 10:21 AM
To: RPG programming on the IBM i (AS/400 and iSeries)
<rpg400-l@xxxxxxxxxxxx>
Subject: Re: XML processing from a field
Error 302 correspond to CCSID mismatch, check (
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_61/rzasc/sc09250
7227.htm
)
302 The parser does not support the requested CCSID value or the first character of the XML document was not '<'.
On Wed, May 25, 2016 at 10:05 AM, Smith, Mike
<Mike_Smith@xxxxxxxxxxxxxxxx>
wrote:
I had it as--
XML-INTO xmlds %XML( esrids: 'case=any');
But changed it as you suggested but still get the same error.
D ESRIDS ds
D XML 32767A varying
D xmlds ds dim(200) qualified
D domain 50A
D instance 50A
XML-INTO xmlds %XML( esrids: 'doc=string');
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
Charles Wilt
Sent: Wednesday, May 25, 2016 9:57 AM
To: RPG programming on the IBM i (AS/400 and iSeries) <
rpg400-l@xxxxxxxxxxxx>
Subject: Re: XML processing from a field
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 islooking at.
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
<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><MergeP
ol
icy>esriMPTDefaultValue</MergePolicy><SplitPolicy>esriSPTDuplicate</
icy>Sp
litPolicy><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></GPCode
dV
alueDomain2>
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.
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.
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.
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.
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.
As an Amazon Associate we earn from qualifying purchases.
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.