Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


FoxPro export exports database fields like this:
<?xml version="1.0"?><Document>  <OrderUpdate>
    <OrderId>12345</OrderId>
    <OrderDate>01/01/2004</OrderDate>
    <Confirmation>0000123</Confirmation>
    <Storage>
      <StorageId>01</StorageId>
      <Quantity>1450</Quantity>
    </Storage>
    <Storage>
      <StorageId>02</StorageId>
      <Quantity>2480</Quantity>
    </Storage>
  </OrderUpdate>
</Document>
It might be comparatively easy to write a Base driver for structures like
this one. A spreadsheet does not imply any such structure.

As far as I know, Excel imports arbitrary flavours of tabular XML through a
wizard analog to a CSV import wizard. You specify the column tags, the row
tags and get raw data in a spreadsheet.
In the following example each <record> represents one consecutive
spreadsheet row (starting at row#1) and each <value> represents a
consecutive column value within that row (starting at column A). First row
has column labels.
<xml>
<record>
 <value type="String">ID</value>
 <value typ="String">Order Date</value>
 <value typ="String">Value</value>
</record>
<record>
 <value type="Number">13</value>
 <value type="Date">2010-12-28</value>
 <value type="String">Some Text</value>
</record>
<record>
 <value type="Number">14</value>
 <value type="Date">2010-12-31</value>
 <value type="String">Some Other Text</value>
</record>
</xml>

This one represents the very same data in German tags:
<xml>
<zeile>
 <wert typ="Zeichen">ID</wert>
 <wert typ="Zeichen">Order Date</wert>
 <wert typ="Zeichen">Value</wert>
</zeile>
<zeile>
 <wert typ="Zahl">13</wert>
 <wert typ="Datum">2010-12-28</wert>
 <wert typ="Zeichen">Some Text</wert>
</zeile>
<zeile>
 <wert typ="Zahl">14</wert>
 <wert typ="Datum">2010-12-31</wert>
 <wert typ="Zeichen">Some Other Text</wert>
</zeile>
</xml>

Other flavours of xml may describe rows within columns, railway connections
in time tables, articles and clients in invoices, ... Any tool to import
arbitrary XML into sheets needs to import text, numbers, "special numbers"
and blanks into columns and rows even if there is no rectangular structure
of records and fields.
If there is a database structure (like the above FoxPro XML) it needs to
import each value (number, text, date, blank) under its given field name.

Most people who ask for XML import into Calc mean the XML flavour produced
by Excel 2003. But they do not know that this particular flavour of XML is
specifically made for that particular application. Other applications to
read Excel-XML can be written easily but they need to be written. XML is not
a file format on its own right. XML lets you define your own file formats.



--
View this message in context: 
http://nabble.documentfoundation.org/Import-XML-files-tp4010875p4011079.html
Sent from the Users mailing list archive at Nabble.com.

-- 
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.