Forum

Notifications
Clear all

XML Formatter / parser


ScottR
(@scottr)
New Member
Joined: 5 years ago
Posts: 2
Topic starter  

I am looking for a tool to open an XML file and convert it to a database or spreadsheet. The XML file is well formed and follows this basic idea:

<?xml version="1.0"?>
<database name='Data' date='2/2/2021 9:08:39 PM'>
<Table1>
<i>1</I>
<Field1>368</Field1>
<Field2>4</Field2>
<Field3>6/12/2012 12:00:00 AM</Field3>
</Table1>
... repeat for all "Table1"
<Table2>
<i>1</I>
<Field1>A</Field1>
<Field2>John</Field2>
<Field3>Smith</Field3>
</Table2>
... repeat for all "Table2"
... many more tables
</database>

This file is generated from an online service I use and is a "Database Backup" of my data. Right now this XML file has almost 5 million lines of text. I can view it and such easily in BBEdit but I am hoping something to convert it to a SQLlite database or a spreadsheet where each sheet is a different table.

Anyone have any thoughts?


Quote
Topic Tags
XML
Dave Hamilton
(@davehamilton)
Admin
Joined: 23 years ago
Posts: 574
 

Hi Scott! I know I probably sound like a broken record, but FileMaker would be my first attempt here. 

Otherwise you're building an XML Parser engine from scratch-ish (you could, for example, use PHP's XML library to slurp in the XML, but then you still need to populate the database from the resulting array, and that's a ... job. 🙂 


ReplyQuote
ScottR
(@scottr)
New Member
Joined: 5 years ago
Posts: 2
Topic starter  

I have tried FileMaker and a number of database import tools. They all seam to expect the XML has data for a single table and not multiple tables. So, basically a fail across the board. I guess I am going to have to write code if I can find some spare time.


ReplyQuote
Share: