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



Or maybe there is, because what you sees as fieldnames xmlGetNode is
actually a
low level subprocedure that returns a value from global fields in the
xmlReader:

here is what can be returned about the current XML element that has been
read:

XML Reader, JSON/CSV to XML converters
--------------------------------------
xmlFromStmf() Reads a text based file into a special buffer
-xmlAddr() Returns the %addr of the special buffer
-xmlSize() Returns the %size of the special buffer
xmlToStmf() Sends output buffer (store 0) to a stmf

xmlReaderInz() Initialize the xmlReader
xmlReaderCase() Sets the reader to return nodes in
upper/lower/mixed case
xmlReader() Reads next XML element or attribute
-xmlGetNodeType() Returns Nodetype on current element
-xmlGetDepth() Returns Three Depth of current element
-xmlGetNode() Returns Node Name of current element
-xmlGetXPath() Returns XPath or part of XPath of current
element
-xmlGetXPathJson() Returns XPath or part of XPath in JSON converted
file
-xmlGetAttr() Returns Current Attribute Name if the reader is
in attribute section
-xmlGetData() Returns Data Part of current element
-xmlGetDataNum() Returns Numeric Part of current element
-xmlAddrOuter() Returns the outer %addr of current element
-xmlSizeOuter() Returns the %size of current element
-xmlAddrInner() Returns the inner %addr of current element
-xmlSizeInner() Returns the inner %size of current element

On Wed, Nov 17, 2010 at 7:23 PM, Henrik RÃtzou <hr@xxxxxxxxxxxx> wrote:

Okey,

why just complicate things, in powerEXt you write XML in to subprocedures:

// ==================================================================
// Writing XML with xmlNode and xmlEndNode methods

xmlNode('orderHead':'orderNo="123456"');
xmlNode('customerNumber':'':'999888');
xmlNode('orderDate':'':%char(%date(timeStamp())));
xmlNode('orderText':'':'Text with spec char <>''"&');
xmlEndNode();

very simple !!!

You read the same XML in one loop, nothing has to be setup, you anly has to
know where the XML
is in storage:


// Read the XML
dow xmlReader = 0;
select;
when xmlGetNode = 'orderhead' and xmlGetAttr = 'orderno';
dsp = 'Order No: ' + xmlGetData;
dsply dsp;
when xmlGetNode = 'customernumber' and xmlGetAttr = '';
dsp = 'Cust No: ' + xmlGetData;
dsply dsp;
when xmlGetNode = 'orderdate' and xmlGetAttr = '';
dsp = 'Order Date: ' + xmlGetData;
dsply dsp;
when xmlGetNode = 'ordertext' and xmlGetAttr = '';
dsp = 'Order Text: ' + xmlGetData;
dsply dsp ' ' wait;
endsl;
enddo;

no Voodo here ....
On Wed, Nov 17, 2010 at 5:58 PM, Scott Klement <
rpg400-l@xxxxxxxxxxxxxxxx> wrote:

Voodoo doesn't use incantations. :)

On 11/17/2010 9:17 AM, Mark Murphy/STAR BASE Consulting Inc. wrote:
So are you saying that the XML Tool Kit is some voodoo witch doctor
craft?

-----rpg400-l-bounces@xxxxxxxxxxxx wrote: -----
From: Aaron Bartell
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
Date: 11/16/2010 08:06PM
Subject: Re: XML-INTO (just need a quick answer)...

I used XML4PR quite a bit about 6 to 8 years ago but haven't really
used the latest incantation.
--
This is the RPG programming on the IBM i / System i (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.




--
Regards,
Henrik RÃtzou
http://powerEXT.com <http://powerext.com/>





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.