Why Export drops namespace prefixes in the exported XML?
- To: mathgroup at smc.vnet.net
- Subject: [mg127152] Why Export drops namespace prefixes in the exported XML?
- From: "Alexey Popkov" <lehin.p at gmail.com>
- Date: Mon, 2 Jul 2012 22:17:23 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
Good day, I am trying to generate Excel-compatible XML file from Mathematica. At first, I have created a test XML file by saving a Microsoft Excel workbook as "XML Table". Then I imported this file: XMLdata = Import["test.xml", "IncludeNamespaces" -> True] Now I am Exporting this backward to XML: Export["test_exported.xml", XMLdata, "AttributeQuoting" -> "\""] The generated file cannot be opened by Excel. Comparison it with the original file shows that most of namespace prefixes are dropped although they were present in XMLdata. Why this happens? How to Export correct XML file which will be compatible with Excel? Thanks in advance. Alexey