XML Import
Scott Walker
ScottWalker at RAMSystemsCorp.com
Mon Apr 13 09:15:30 PDT 2009
Mark,
Thanks for your thoughts. I looked at your xml2cvs and I can see how that
would make thinks easier. Like you said, that still leaves me with hand
coding of the fp process to look at the cvs file and walk through the
structure and figure out what to do with each line of data. Big job for one
xml source. Huge job for 20 different xml sources with different schema.
Maybe not practical to do.
I don't have a firm idea of how this could be done in an automated or
semi-automated way. I'm just starting to think about it a get a model in my
head.
Something like this:
Note: My fields may be a real field number or real field name or an array
(since there may be multiple instances of a tag, like when we are handling
the line items on an order
I would have a record like this for each XML source in my XML_Sources file:
My Fields XML Tag (for this source) One
or Many
========= =========================
===========
Cust_Code header.customer_id one
Order_Date header.order_dt one
Part_Num[xx] item.part_no many
Desc[xx] item.description
many
Qty[xx] item.quantity many
Then when this was run, I would end up with all the data from the xml source
in my fields/arrays. My processing would then have to manage getting this
data to my real (permenant) files.
So when I had to deal with the next XML source, in THEORY, perhaps, I
hope/dream, that all I would have to do is create another record in my XML
Sources basically mapping the schema for that source to the fields/arrays in
my processing. At that point, there would be no additional coding necessary
to get the data to my permanent files.
Anyhow, this is currently totally half baked and is probably ignoring all
the real world problems that will be encountered. Just a rough idea for
now.
Regards,
Scott
-----Original Message-----
From:
filepro-list-bounces+scottwalker=ramsystemscorp.com at lists.celestial.com
[mailto:filepro-list-bounces+scottwalker=ramsystemscorp.com at lists.celestial.
com] On Behalf Of Fairlight
Sent: Sunday, April 12, 2009 12:57 AM
To: 'filePro Mailing List'
Subject: Re: XML Import
In the relative spacial/temporal region of
Sat, Apr 11, 2009 at 09:58:16PM -0400, Scott Walker achieved the spontaneous
generation of the following:
> If anyone has done anything like this and can share some guidance, I would
> appreciate it. If you have an application or code that can be
incorporated
> into my code that would make this process easier, I would be willing to
pay
> for it.
Getting the XML into fP will be considerably easier with something like:
http://www.fairlite.com/fc/products/xml2csv/
That said, even in a CSV format, you're going to have no way of avoiding
"walking" the data structure to establish data elements' elationships, no
matter what format the data is massaged into. There's no getting around
that fact. When the data format changes from one DTD or Schema to the
another, all the relationships you're looking for change as well.
There is no magic bullet (TTBOMK) to get around this fact. You'd pretty
much need AI to intelligently handle vastly differing formats without user
intervention, in terms of, "What do I do with this data? Where does it go?
What am I looking for?" All we can really do is make it a bit less painful
to deal with in fP formatting/parsing-wise--which my xml2csv does. Try the
demo page.
mark->
--
"I'm not subtle. I'm not pretty, and I'll piss off a lot of people along
the way. But I'll get the job done" --Captain Matthew Gideon, "Crusade"
_______________________________________________
Filepro-list mailing list
Filepro-list at lists.celestial.com
http://mailman.celestial.com/mailman/listinfo/filepro-list
More information about the Filepro-list
mailing list