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




Hi Aaron, thanks for your interest in my problem. I could do something like this, I did get a nifty little program from Jon Paris that would take a XML file and drop it into a spool file showing what each section of the file's element name was the the value of the chars inside it. Based on what I am facing here, the 'generic' program would be a massive checking of type of document I am working with (sales, returns, shipping etc.) and have to check the potential value of any element, which could have many different names going to many different field names in our files. This thing could me miles long.

I ran this past my IT guy who has worked with XML in other aspects and said one of the beauties of XML is you can be very specific in your naming of things to match what you need. His question was why to make something generic out of something that is supposed to be specific? Guess that is a debate for me and my supervisors.

Sharon


Date: Tue, 18 Nov 2008 05:55:47 -0600
From: aaronbartell@xxxxxxxxx
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Create a generic mapping function that will use XML-SAX

What I was suggesting is leaving any and all hard-coding outside of this
generic program so it could play the part of parsing all XML documents
it comes in contact with so no other programs on the system would have
to perform any XML parsing. I have written such a program for RPG-XML
Suite (www.rpg-xml.com) but that obviously doesn't help this situation
if you don't have that software package, though it wouldn't be that hard
to recreate with IBM's parser as they give you all the necessary parsing
events to accomplish the task.

I had to head over to wikipedia to learn about what a
finite-state-machine was :-) And I still don't completely follow you,
but that is fine as long as we can come to conclusions on the details
(maybe if I have some more coffee I will catch on :-).

Aaron Bartell
http://mowyourlawn.com

sjl wrote:
I wrote:
That sounds rather like a state machine...

then Aaron wrote:
Maybe you could expound on your comment
as I am not sure what you are getting at.


Aaron -

I was a little confused on what you wrote.

I was thinking along the line of instead of having the XML tag names
hard-coded in the program to storing them in a database file and let the
program process thru the tag names stored in the database file for parsing
the XML document, which I believe makes it similar to a
finite-state-machine.

Does that make sense?

- sjl






--
This is the RPG programming on the AS400 / 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.


_________________________________________________________________
Get more done, have more fun, and stay more connected with Windows Mobile®.
http://clk.atdmt.com/MRT/go/119642556/direct/01/

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