Re: convert MODS XML into CSV or tab-delimted text

From: Simon Brown <simoncbrown_at_nyob>
Date: Tue, 22 Apr 2014 13:50:06 -0700
To: CODE4LIB_at_LISTSERV.ND.EDU
There is also the XML package for R with tools for parsing XML which are
all completely free.  It even has a function called xmlToDataFrame to
convert an XML document to a data frame which can then be written to .csv

"This function can be used to extract data from an XML document (or
sub-document) that has a sim- ple, shallow structure that does appear
reasonably commonly. The idea is that there is a collection of nodes which
have the same fields (or a subset of common fields) which contain primitive
values, i.e. numbers, strings, etc. Each node corresponds to an
"observation" and each of its sub-elements correspond to a variable. This
function then builds the corresponding data frame, using the union of the
variables in the different observation nodes. This can handle the case
where the nodes do not all have all of the variables.
 "


On Tue, Apr 22, 2014 at 1:37 PM, Cary Gordon <listuser_at_chillco.com> wrote:

> The easiest approach to converting XML to flat formats is to use a tool
> like Oxygen or Altova MapForce. Unfortunately, MapForce Enterprise — the
> version you would need — runs around $1k and Oxygen XML Editor is also
> pricey, although you might qualify for a discount.
>
> You can also open XML files directly in Excel or Open Office, but they
> might return a mess.
>
> Cary
>
>
> On Apr 22, 2014, at 11:35 AM, English, Eben <eenglish_at_BPL.ORG> wrote:
>
> > Hello,
> >
> > Does anyone out there have an XSL stylesheet to transform MODS XML into
> > a CSV or tab-delimited text file?
> >
> > Even if it's highly localized to your own institution/project, it would
> > probably still be useful.
> >
> > Thanks in advance,
> >
> > Eben English
> > Web Services Developer
> > Boston Public Library
> > 700 Boylston St.
> > Boston, MA 02116
> > 617.859.2238
> > eenglish_at_bpl.org
>



-- 
Simon Brown
simoncbrown_at_gmail.com
simoncharlesbrown (Skype)
831.440.7466 (Phone)

*Following our will and wind we may just go where no one's been -- MJK*
Received on Tue Apr 22 2014 - 16:50:45 EDT