[Hidden-tech] XML on OSX

Rich Roth webmaster at hidden-tech.net
Sat Feb 10 17:24:55 EST 2018


Here is perl code to do it:

|#!/usr/bin/perl # This script converts a XML file to CSV format. # Load 
the AnyData XML to CSV conversion modules use XML::Parser; use 
XML::Twig; use AnyData; my $input_xml = "test.xml"; my $output_csv = 
"test.csv"; $flags->{record_tag} = 'ITEM'; adConvert( 'XML', $input_xml, 
'CSV', $output_csv, $flags );|

From: https://stackoverflow.com/questions/18969666/perl-xml-to-csv-parse

JIC you don't have perl: https://learn.perl.org/installing/osx.html
and use cpan to install the use modules

Yes, Perl still exists and thrives



On 2/10/2018 4:37 PM, Noah Paessel wrote:
> How many files do you need to convert?
>
> For a small number you of files you can probably use an online 
> converter. I just tried two and they seemed to work converting some 
> sample XML files I had lying around into CSV:
>
> https://json-csv.com/xml
> http://xmlgrid.net/xml2text.html
>
> The second link lets you specify which fields to use in your output.
>
> If you have a large number of files, or maybe larger files you might 
> benefit from a small script in python or ruby.
>
> Here is a library & command line tool that seems to fit the bill: 
> https://github.com/knadh/xmlutils.py
>
> Cheers,
>
> - noah
>
>
> On Feb 10, 2018, 12:12 PM -0500, Mat Jacobson <mj4d4s at gmail.com>, wrote:
>> Howdy-
>>
>> I’m working on a FileMaker app and need to convert a bunch of XML 
>> data files with separate structure files.
>>
>> Anyone know how to open and convert to csv?
>>
>> Thanks!
>>
>> Mat
>>
>>
>> _______________________________________________
>> Hidden-discuss mailing list - home page: http://www.hidden-tech.net
>> Hidden-discuss at lists.hidden-tech.net
>>
>> You are receiving this because you are on the Hidden-Tech Discussion 
>> list.
>> If you would like to change your list preferences, Go to the Members
>> page on the Hidden Tech Web site.
>> http://www.hidden-tech.net/members
>
>
> _______________________________________________
> Hidden-discuss mailing list - home page: http://www.hidden-tech.net
> Hidden-discuss at lists.hidden-tech.net
>
> You are receiving this because you are on the Hidden-Tech Discussion list.
> If you would like to change your list preferences, Go to the Members
> page on the Hidden Tech Web site.
> http://www.hidden-tech.net/members

-- 
Rich Roth
Webmaster/Steering Committee Member
Hidden-tech http://www.hidden-tech.net
The Talent you need is right here,
Join and share your skills
((Sponsored by Thrives Media))
http://www.thrivesmedia.com
http://www.welovemuseums.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.hidden-tech.net/pipermail/hidden-discuss/attachments/20180210/fa0c0969/attachment.html 


Google

More information about the Hidden-discuss mailing list