XML Import

Bill Campbell bill at celestial.com
Mon Apr 13 13:18:48 PDT 2009


On Mon, Apr 13, 2009, Fairlight wrote:
>
>>From inside the gravity well of a singularity, Scott Walker shouted:
>> 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.
>
>It's not -too- bad if the information you actually need falls in specific
>areas and you can prune whole areas.  Actually, pruning is kind of a
>convenience, since you can technically just walk the data tree with
>entry/exit hints and ignore the rest.  But it puts less CPU cycles to the
>job of walking the tree later in any event.
>
>See after your notes for a practical, real-world point of interest that may
>shoot this in the foot.
>
...
>
>Okay.  Just that bit as a tiny real-world example of a multi-record
>response set...take this little bit.
>
>Assume you map first_name to a field, last_name to another field.
>Suddenly, you have multiple last names per record.  Or do you?  What are
>you defining as "a record"?  Each instance of Billing?  Each instance of
>Shipping?  Each response?  A permutation of both, with header/detail,
>requiring multi-pass recursion?
>
>And you want to create records automatically, based on multiple formats,
>where "record" could have vastly different meanings?

I make no claims on being an XML expert, using it primarily with
DocBook to write documentation, and using the python xmlrpc
modules to do quite a few useful things between machines.

I have read a fair amount about XML, and it seems to me that much
of the work can be done using xslt and xpath to do the heavy
lifting as thes provide fairly simple methods to transform XML
to different formats, frequently HTML or XHTML without having to
do much, if any, programming per se.

There are a fair number of xslt processors available, xsltproc,
on Red Hat and CentOS systems for one.

XML can be looked upon as an object database, as opposed to a
relational database, thus lending it to modelling real-world
things fairly easily.  The issue becomes one of mapping from that
object world to the tables of a relational database or file
management system such as FilePro.

Bill
-- 
INTERNET:   bill at celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
Fax:            (206) 232-9186  Skype: jwccsllc (206) 855-5792

I presume you all know who I am.  I am humble Abraham Lincoln.  I have been
solicited by many friends to become a candidate for the legistlature.  My
politics are short and sweet, like the old woman's dance.  I am in favor of
a national bank ... in favor of the internal improvements system, and a
high protective tariff. -- Abraham Lincoln, 1832


More information about the Filepro-list mailing list