ADV: XML to CSV Converter
Fairlight
fairlite at fairlite.com
Wed Jan 2 15:11:55 PST 2008
Getting XML Into filePro
========================
Has your company or organisation been asked to exchange data with a third
party? Was that data to be exchanged in XML format, possibly also using
SOAP?
Have you looked at an XML sample someone gave you, looked at what commands
were available in filePro, and thrown up your hands as to how to get that
data imported easily?
Were you unable to figure out how to sensibly and reasonably parse not only
one document layout, but multiple different layouts? Did the complexity of
not knowing where there would be whitespace, or the potential for having all
the data rammed into one single line without breaks cause you to break into
a cold sweat as a deadline approached for a project?
Does your data exchange partner embed whole files in their XML, encoded in
Base64? Have you been scratching your head as to how to get the files out
of there and store them somewhere as the useful files they originally were?
Do you have XML-related filePro projects that have been collecting dust on
your desk for over a year because they're too time-consuming or just plain
daunting?
Relax! It doesn't have to be difficult!
The Fairlight XML to CSV Converter takes XML files and spits out CSV files
that filePro can understand with the IMPORT command. If you can use the
IMPORT functionality in filePro, you can easily import your XML data after
it's been fed through the converter. All the pain and uncertainty is taken
away instantly!
This converter can do things for your XML that will make your importing
needs a snap! Look at what this tool can do for you:
* Simple, two-field-per-line CSV output is generated from any valid XML.
* Indicator lines in that same simple format tell you where in the data
heirarchy you are, and therefore help you maintain data in relation to
other data as you handle the IMPORT results.
* You can take the whole path to an element, or you can have the converter
strip the element or attribute down to its simple basename with the use
of a simple flag.
* You can replace the field separator (a comma, by default) with any
character you choose. That's the "F=" in IMPORT.
* You can change the opening and closing field delimiters ["O=" and "C=",
in IMPORT, respectively] to any character you choose. The default is
to use doublequotes.
* You can define elements to be handled as Base64. When they're encountered,
the data (often a whole file someone sent within their XML) is decoded,
stored to a file with a safe name, and that filename is given to you in the
CSV output. Once you tell the converter what field(s) to decode and
store, extraction and decoding are automatic!
* You can exclude elements, attributes, or even whole swaths of the XML
at a whim. If your data exchange partner sends you a 75KB file, and
whole sections of the data are irrelevant to you, you can define what
gets left out by defining extremely simple rules. Don't parse more
data than you absolutely have to!
* Due to namespace preservation, you can get data straight out of SOAP
responses without going through extra contortions!
* You get the benefit of having a command-line program. This lets you get
away from kludges like -trying- to make a GUI tool out there do something
in an automated fashion that was never intended by the authors. You can
do conversions at the command prompt, or you can embed the commands into
filePro wherever and however they're needed. This tool is -designed- for
automation!
* No license manager. EVER. No user counts. No seats. You install this
on a system and you use it as much, often, and by as many users as you
like! It's not bound to filePro in any way--meaning that you can use this
as a generic solution to get XML into a simple CSV format for -any- needs
you might have.
* Minor point release and bugfix revision level upgrades are free.
If you need to get XML data into filePro, this is the way to go. Coding of
IMPORT routines is still required. I'm not claiming that this command puts
the data into filePro all on its own. What I -am- saying is that this tool
gives you the data in a format that's -easily- usable by you with the IMPORT
command, and it does the extras like decoding/storing embedded files as
well. You can possibly save yourself the cost of the product in time saved
-trying- to come up with processing that parses -one- type of XML document.
Multiply that over multiple projects, and you're coming out way ahead!
If you're interested, please visit:
http://xml2csv.fairlite.com/
The full documentation is available, as is a GUI front-end-based demo that
will let you test-drive the software hands-on, with your own data. Reading
the docs goes only so far. Seeing the nightmare nest of data that you need
to work with turned into something -manageable- is...just something that's
best seen directly!
You'll not -just- be able to see the results in the browser. No, no, no!
You'll also be able to take the data given back, copy it from the demo
return page, paste it to a local file, and test it out as you like, with
any software you want, locally! Find out if this product does what you
need before you buy it!
Mark Luljak
Fairlight Consulting
More information about the Filepro-list
mailing list