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



That would be great. I would greatly appreciate it.

Mike

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Alan Campin
Sent: Tuesday, April 25, 2017 1:49 PM
To: RPG programming on the IBM i / System <rpg400-l@xxxxxxxxxxxx>
Subject: Re: xml-into help needed

I would recommend using XML-Sax for something this complicated. I would happy to send you some code if you haven't worked with before.

On Apr 25, 2017 10:38 AM, "MARK GOLDEN" <mark_golden@xxxxxxxxxxxxxxx> wrote:

Hi Mike,
I use the XML-SAX op-code where there is an array dimension telling
the parser how many levels there are in the XML document.Is there
something similar you need to set with the XML-INTO.
R,Mark.

On Tuesday, 25 April 2017, 18:25, "Smith, Mike"
<Mike_Smith@xxxxxxxxxxxxxxxx> wrote:


I'm trying to process an XML file. I am struggling trying to get it
loaded via XML-INTO.
I can get the first channel element to load but nothing after that.

Any idea what I've got wrong.

Sample from File
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <!---->
<!--Itron FCS Generated: 4/21/2017 9:15:49 AM LT--> <!---->
<MeterReadingDocument xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
<ImportExportParameters CreateResubmitFile="false">
<DataFormat DSTTransitionType="ITRON_Compliant"
ReadingTimestampType="Utc" />
</ImportExportParameters>
<Channels>
<Channel ReadingsInPulse="false" IsRegister="true"
IsReadingDecoded="false" MarketType="Gas">
<ChannelID EndPointChannelID="32842936:1" />
<Readings>
<Reading Value="0009290249" ReadingTime="2017-03-31T13:44:46" />
</Readings>
<OptionalChannelDatas>
<OptionalChannelData Name="ERTType" Value="2" />
<OptionalChannelData Name="Tamper1" Value="0" />
<OptionalChannelData Name="Tamper2" Value="2" />
</OptionalChannelDatas>
</Channel>
<Channel ReadingsInPulse="false" IsRegister="true"
IsReadingDecoded="false" MarketType="Gas">
<ChannelID EndPointChannelID="41409881:1" />
<Readings>
<Reading Value="0000281274" ReadingTime="2017-04-18T11:51:00" />
</Readings>
<OptionalChannelDatas>
<OptionalChannelData Name="ERTType" Value="12" />
<OptionalChannelData Name="Tamper1" Value="0" />
<OptionalChannelData Name="Tamper2" Value="0" />
</OptionalChannelDatas>
</Channel>
</Channels>
</MeterReadingDocument>


What I currently have for data structures
D Channels DS Qualified Dim(99999)
D Channel LikeDS(Channel)
D ChannelID LikeDS(Channelid)
D Readings LikeDS(Readings)

D Channel DS Template
D readingsinpulse...
D 5a
D isregister 5a
D isreadingdecoded...
D 5a
D markettype 5a
D
D Channelid DS Template
D endpointchannelid...
D 10a
D Readings DS Template
D readingvalue 10a
D readingtime 20a



XML-INTO Channels
%XML(XMLFile: 'doc=file +
datasubf=data +
countprefix=count +
case=any');
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.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD



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

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD
--
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.

Help support midrange.com by shopping at amazon.com with our affiliate link: http://amzn.to/2dEadiD

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