Yeah, that was what I had done, until I had found a different route.

I don't really like the idea of looping thru the 'events' of the XML
string, to get values.
It just seemed a bit....loose. Meaning, if I wanted to loop thru all my
<tags> and retrieve
it's values, and do something with them, then this loop process just
appeared to be a bit
'old school'. Loop thru once to get the tag-name, second time to get the
tag's value, and then
the last time to write, or use the values. UGH!

So, what I did instead was for every "*XML_START_ELEMENT" event, I would
take the <tag> name
and execute an XML-INTO to get the tag's value.

So, in that sense, avoiding all other events, just made sense.

It's doing what I want it to do, I was just hoping to make it a bit more
efficient.


David L. Mosley, Jr.
Technical Solutions Architect
2000 CentreGreen Way
Suite 250
Cary, NC 27513

www.dancik.com



Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
12/23/2009 02:44 PM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: XML-SAX Event-Handler loop.






No. Your handler is always called for all events.

However, you can simply ignore the events you don't want to handle.
(i.e. use an IF/ELSE or SELECT/WHEN to simply have your routine end
without doing anything when it's an event you didn't want to handle)
This'd have the same net result.

Why do you ask?


dmosley@xxxxxxxxxx wrote:
Is there a way to limit my handler to only execute for a specific event.
Meaning, I only want the handler(procedure) to execute JUST on the
*XML_START_ELEMENT event.

Is this possible?

Thanks
David

David L. Mosley, Jr.
Technical Solutions Architect
2000 CentreGreen Way
Suite 250
Cary, NC 27513

www.dancik.com


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.