使用Excel 2010进行XML映射

时间:2018-06-14 08:01:18

标签: xml excel

当我想从XML映射中使用Excel 2010导出XML文件时,我遇到了一些问题。

使用此映射:

<?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:element name="XmlPanels">
    <xs:complexType>
        <xs:sequence>
            <xs:element name="Panel" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="Family" type="xs:string" minOccurs="0"/>
                        <xs:element name="Model" type="xs:string" minOccurs="0"/>
                        <xs:element name="Position" type="xs:string" minOccurs="0"/>
                        <xs:element name="Description1" type="xs:string" minOccurs="0"/>
                        <xs:element name="Description2" type="xs:string" minOccurs="0"/>
                        <xs:element name="Glass" type="xs:string" minOccurs="0"/>
                        <xs:element name="Width" type="xs:string" minOccurs="0"/>
                        <xs:element name="Height" type="xs:string" minOccurs="0"/>
                        <xs:element name="Thickness" type="xs:string" minOccurs="0"/>
                        <xs:element name="ThermalCoef" type="xs:string" minOccurs="0"/>

                        <xs:element name="Exact" minOccurs="0">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="Color1" type="xs:string" minOccurs="0"/>
                                    <xs:element name="Color2" type="xs:string" minOccurs="0"/>
                                    <xs:element name="Color3" type="xs:string" minOccurs="0"/>
                                    <xs:element name="Color4" type="xs:string" minOccurs="0"/>

                                    <xs:element name="Line" minOccurs="0">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="Code" type="xs:string" minOccurs="0"/>
                                                <xs:element name="Description1" type="xs:string" minOccurs="0"/>
                                                <xs:element name="Description2" type="xs:string" minOccurs="0"/>
                                                <xs:element name="Bis" type="xs:string" minOccurs="0"/>
                                                <xs:element name="Price1" type="xs:string" minOccurs="0"/>
                                                <xs:element name="Price2" type="xs:string" minOccurs="0"/>
                                                <xs:element name="Price3" type="xs:string" minOccurs="0"/>
                                                <xs:element name="Price4" type="xs:string" minOccurs="0"/>
                                                <xs:element name="Switch" type="xs:string" minOccurs="0"/>
                                                <xs:element name="Conditions" type="xs:string" minOccurs="0"/>
                                                <xs:element name="Image" type="xs:string" minOccurs="0"/>
                                            </xs:sequence>
                                        </xs:complexType>
                                    </xs:element>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
</xs:element>

我获得this XML file

但我想获得this kind of XML file

我现在不知道为什么Excel会添加一个新的Panel和Exact。

有人可以帮助我吗?

0 个答案:

没有答案