Sign in Join
Wiki copytemporary

fpXMLXSDExport: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
1-## Contents
2-
3- * 1 Overview
4- * 1.1 FPC
5- * 1.2 Lazarus
6- * 2 Export formats
7- * 2.1 AccessCompatible
8- * 2.2 ADONETCompatible
9- * 2.3 ExcelCompatible
10- * 2.4 DelphiClientDataset
11- * 3 Other settings
12- * 4 Lazarus and examples
13- * 5 License
14- * 6 See also
15-
161## Overview
172
183### FPC
194
20-The fpXMLXSDExport module is part of [[fpDBExport]] in the FreePascal FCL database modules.
5+The fpXMLXSDExport module is part of [[fpDBExport]] in the FreePascal FCL database modules.
216
22-This export module provides export to various forms of [[XML]], selectable by the ExportFormat setting. Note that not exporting indexes appears as a limitation in most formats below, but indexes probably will probably need to be changed anyway in an new environment/database.
7+This export module provides export to various forms of [[XML]], selectable by the ExportFormat setting. Note that not exporting indexes appears as a limitation in most formats below, but indexes probably will probably need to be changed anyway in an new environment/database.
238
24-There is also a [fpsimplexmlexport](</index.php?title=fpsimplexmlexport&action=edit&redlink=1> "fpsimplexmlexport \(page does not exist\)") module which can export a single format XML.
9+There is also a [[fpsimplexmlexport]] module which can export a single format XML.
2510
2611### Lazarus
2712
28-The component is located on the _Data Export_ tab.
13+The component is located on the *Data Export* tab.
2914
30-[![DataExportTab.png](/wiki-images/6/69/DataExportTab.png)](</File:DataExportTab.png>)
15+![](/wiki-images/6/69/DataExportTab.png)
3116
3217## Export formats
3318
34-This component supports various XML formats.
19+This component supports various XML formats.
3520
3621### AccessCompatible
3722
38-This format generates Microsoft Access XP/2002-2010 (and presumably SQL Server) compatible XML.
23+This format generates Microsoft Access XP/2002-2010 (and presumably SQL Server) compatible XML.
3924
40-You can specify to include or exclude inline XSD data definition with the CreateXSD setting. Recommended to leave it to true so Access can build up the table structure. If you have an existing compatible table, you wouldn't need the XSD.
25+You can specify to include or exclude inline XSD data definition with the CreateXSD setting. Recommended to leave it to true so Access can build up the table structure. If you have an existing compatible table, you wouldn't need the XSD.
4126
42-Index definitions are exported in this format.
27+Index definitions are exported in this format.
4328
44-The Access format as emitted by Access XP at least uses the decimal separator of the computer the export is running on. E.g. a US locale will emit 42.42, while a Dutch locale will emit 42,42. If you want to override the decimal separator to a value regardless of locale (recommended if exchanging data across multiple locales), please set the DecimalSeparator (e.g. to '.').
29+The Access format as emitted by Access XP at least uses the decimal separator of the computer the export is running on. E.g. a US locale will emit 42.42, while a Dutch locale will emit 42,42. If you want to override the decimal separator to a value regardless of locale (recommended if exchanging data across multiple locales), please set the DecimalSeparator (e.g. to '.').
4530
46-Limitations:
31+Limitations:
4732
48- * Import of BLOB/binary type data in Access is problematic as Access has no real binary datatype, only an OLE datatype. Access stores OLE metadata, after that the binary object. When exporting to XML, Access stores the entire packet as base64 data. We cannot replicate this functionality, so we just base64 encode the BLOB, and lose the OLE metadata. If you want to, in Access, you can probably programmatically read the data as blob data and copy it to a "real" OLE field. See e.g. <http://support.microsoft.com/?kbid=103257> for hints on how to save the contents of the export BLOB to a file.
49- * Date/time field data outside of Access limits are discarded (a NULL is inserted).
50- * GUIDs are exported as text as Access has no equivalent field type.
51- * Large numeric values may overflow Access import capabilities. Patches welcome.
33+- Import of BLOB/binary type data in Access is problematic as Access has no real binary datatype, only an OLE datatype. Access stores OLE metadata, after that the binary object. When exporting to XML, Access stores the entire packet as base64 data. We cannot replicate this functionality, so we just base64 encode the BLOB, and lose the OLE metadata. If you want to, in Access, you can probably programmatically read the data as blob data and copy it to a "real" OLE field. See e.g. <http://support.microsoft.com/?kbid=103257> for hints on how to save the contents of the export BLOB to a file.
34+- Date/time field data outside of Access limits are discarded (a NULL is inserted).
35+- GUIDs are exported as text as Access has no equivalent field type.
36+- Large numeric values may overflow Access import capabilities. Patches welcome.
5237
5338### ADONETCompatible
5439
55-This format generates XML compatible with the .Net framework (specifically the ADO.NET data access libraries). It should work for versions 2 to 4; version 1/1.1 has not been tested.
40+This format generates XML compatible with the .Net framework (specifically the ADO.NET data access libraries). It should work for versions 2 to 4; version 1/1.1 has not been tested.
5641
57-In this format you can also specify XSD or no XSD using the CreateXSD setting. This output format is fairly generic and could be usable for import in other applications, as well.
42+In this format you can also specify XSD or no XSD using the CreateXSD setting. This output format is fairly generic and could be usable for import in other applications, as well.
5843
59-Limitations:
44+Limitations:
6045
61- * Index definitions are not exported in this format.
46+- Index definitions are not exported in this format.
6247
6348### ExcelCompatible
6449
65-This format generates Microsoft Excel XP/2002-2010 compatible XML.
50+This format generates Microsoft Excel XP/2002-2010 compatible XML.
6651
67-This format recreates the data as Excel worksheet data. It does not include formatting and formulas, just plain data.
52+This format recreates the data as Excel worksheet data. It does not include formatting and formulas, just plain data.
6853
69-The CreateXSD setting has no effect in this format - the Excel XML format doesn't seem to support compatible metadata.
54+The CreateXSD setting has no effect in this format - the Excel XML format doesn't seem to support compatible metadata.
7055
71-Limitations:
56+Limitations:
7257
73- * Index definitions are not exported in this format.
74- * Binary data is not supported in the Excel XML format.
75- * The Boolean (true/false) data format is not supported in this Excel XML format; instead 0/1 integers are exported.
76- * Line endings within text cells/fields (generated in Excel by pressing Alt-Enter) are not supported as we'd need to output in the XML which is not possible using current FCL XML libraries.
58+- Index definitions are not exported in this format.
59+- Binary data is not supported in the Excel XML format.
60+- The Boolean (true/false) data format is not supported in this Excel XML format; instead 0/1 integers are exported.
61+- Line endings within text cells/fields (generated in Excel by pressing Alt-Enter) are not supported as we'd need to output
62+ in the XML which is not possible using current FCL XML libraries.
7763
78-The [[FPSpreadsheet]] code could be a good alternative to this format: it offers native format output and probably multiline support.
64+The [[FPSpreadsheet]] code could be a good alternative to this format: it offers native format output and probably multiline support.
7965
8066### DelphiClientDataset
8167
82-This format generates Delphi ClientDataset compatible XML.
68+This format generates Delphi ClientDataset compatible XML.
8369
84-This format allows Delphi applications to use the ClientDataset.LoadFromFile method to read the data.
70+This format allows Delphi applications to use the ClientDataset.LoadFromFile method to read the data.
8571
86-It has been written based on TurboDelphi (Delphi 2006) behaviour and exports UTF-8 encoded XML.
72+It has been written based on TurboDelphi (Delphi 2006) behaviour and exports UTF-8 encoded XML.
8773
88-The CreateXSD setting has no effect in this format - Clientdataset metadata is always exported.
74+The CreateXSD setting has no effect in this format - Clientdataset metadata is always exported.
8975
90-Limitations:
76+Limitations:
9177
92- * Index definitions are not exported in this format.
93- * Variants are exported as binary data; patches for conversion are welcome.
94- * Apparently, ClientDatasets have insert new data and update data modes; as of now, only the insert new data mode is supported.
78+- Index definitions are not exported in this format.
79+- Variants are exported as binary data; patches for conversion are welcome.
80+- Apparently, ClientDatasets have insert new data and update data modes; as of now, only the insert new data mode is supported.
9581
9682## Other settings
9783
98-As the XML formats used above defines how date/time formats, Boolean formats etc are used, these general export settings have no effect:
84+As the XML formats used above defines how date/time formats, Boolean formats etc are used, these general export settings have no effect:
9985
100- * BooleanFalse
101- * BooleanTrue
102- * DateFormat
103- * DateTimeFormat
104- * DecimalSeparator (only has effects in Access compatible export mode, no effect in other modes)
105- * CurrencyDigits
106- * CurrencySymbol
107- * IntegerFormat
108- * TimeFormat
86+- BooleanFalse
87+- BooleanTrue
88+- DateFormat
89+- DateTimeFormat
90+- DecimalSeparator (only has effects in Access compatible export mode, no effect in other modes)
91+- CurrencyDigits
92+- CurrencySymbol
93+- IntegerFormat
94+- TimeFormat
10995
11096## Lazarus and examples
11197
112-For an example, please see the xmlxsdexporttest.lpr test program in packages\fcl-db\tests.
98+For an example, please see the xmlxsdexporttest.lpr test program in packages\fcl-db\tests.
11399
114-An additional example can be found in your FPC installatoin in packages\fcl-db\examples\dbftool.lpr.
100+An additional example can be found in your FPC installatoin in packages\fcl-db\examples\dbftool.lpr.
115101
116-In Lazarus, you can use the lazdbexport package (the **TFPDataExporter** and **TStandardExportFormats** components in particular) to use this method, or the **TXMLXSDExport** component.
102+In Lazarus, you can use the lazdbexport package (the **TFPDataExporter** and **TStandardExportFormats** components in particular) to use this method, or the **TXMLXSDExport** component.
117103
118104## License
119105
120-The fpXMLXSDExport module is freeware, licensed under the MIT license: all use free, but no liability accepted. It is also licensed under the license used for the FreePascal Free Component Library (FCL), so take your pick.
106+The fpXMLXSDExport module is freeware, licensed under the MIT license: all use free, but no liability accepted. It is also licensed under the license used for the FreePascal Free Component Library (FCL), so take your pick.
121107
122108## See also
123109
124- * [[fpDBExport]]
125- * [[fpdbfexport]] Similar module that exports to DBF/(Visual) FoxPro formats.
110+- [[fpDBExport]]
111+- [[fpdbfexport]] Similar module that exports to DBF/(Visual) FoxPro formats.
126112
127113---
128-*From the Free Pascal wiki, page "fpXMLXSDExport", as the Internet Archive kept it on 2025-03-23. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
114+*From the Free Pascal wiki, page "fpXMLXSDExport", as it stood on 2017-06-30 after a change by E-ric, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history