我试图找出问题所在。我收到没有XSD的XML代码。我需要将excel数据导出到XML,并使用收到的XML文件中的映射。但是,当我导入数据时,这些数据不在同一行中,并且在我无法将其导出到XML之后。
我会很高兴为您提供任何帮助。
XML代码:
<?xml version="1.0" encoding="UTF-8"?>
<LxERP>
<Firm>
<Contracts>
<Contract>
<ContractName>CA-Fleet</ContractName>
<Asset ClientID="1FA6P">
<AssetName>527378 6359</AssetName>
<AssetSerialNumber>G6359</AssetSerialNumber>
<ClientNumber>527</ClientNumber>
<CodeAssetCategoryID>Equipment</CodeAssetCategoryID>
<CodeAssetGroupID>Fleet</CodeAssetGroupID>
<CCC_FleetStatus>Active</CCC_FleetStatus>
<CodeAssetOperationStatusID>Active</CodeAssetOperationStatusID>
<CodeAssetTypeID>P</CodeAssetTypeID>
<FinancialContractID>CA-Fleet</FinancialContractID>
<Make>FORD</Make>
<ModelNumber>Fudn</ModelNumber>
<CCC_LeaseVendor>Don</CCC_LeaseVendor>
<CCC_ModelYear>2016</CCC_ModelYear>
<CCC_CustomerReference/>
<CCC_Equip_AP_Coding>3942006206</CCC_Equip_AP_Coding>
<CCC_DriverAddress>65eet</CCC_DriverAddress>
<CCC_DriverCity>Lo</CCC_DriverCity>
<CCC_DriverStateProvince>ON</CCC_DriverStateProvince>
<CCC_DriverZipPostalCode>R2</CCC_DriverZipPostalCode>
<CCC_DriverEmailAddress>othy</CCC_DriverEmailAddress>
<CCC_DriverFirstName>Tim</CCC_DriverFirstName>
<CCC_DriverLastName>Wil</CCC_DriverLastName>
<CCC_DriverMiddleName/>
<CCC_FleetBusinessUnit>ARC</CCC_FleetBusinessUnit>
<CCC_FleetClientAssetID/>
<CCC_FleetUseType>DRIER</CCC_FleetUseType>
<DispositionDate/>
<AssetSalePrice>0.000</AssetSalePrice>
<InServiceDate>07/15/2015</InServiceDate>
</Asset>
<!-- Removed one '</Asset>' tag here -->
</Contract>
</Contracts>
</Firm>
</LxERP>
生成的XSD代码:
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="LxERP">
<xs:complexType>
<xs:sequence>
<xs:element name="Firm">
<xs:complexType>
<xs:sequence>
<xs:element name="Contracts">
<xs:complexType>
<xs:sequence>
<xs:element name="Contract">
<xs:complexType>
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element type="xs:string" name="ContractName"/>
<xs:element name="Asset">
<xs:complexType mixed="true">
<xs:sequence>
<xs:element type="xs:string" name="AssetName" minOccurs="0"/>
<xs:element type="xs:string" name="AssetSerialNumber" minOccurs="0"/>
<xs:element type="xs:short" name="ClientNumber" minOccurs="0"/>
<xs:element type="xs:string" name="CodeAssetCategoryID" minOccurs="0"/>
<xs:element type="xs:string" name="CodeAssetGroupID" minOccurs="0"/>
<xs:element type="xs:string" name="CCC_FleetStatus" minOccurs="0"/>
<xs:element type="xs:string" name="CodeAssetOperationStatusID" minOccurs="0"/>
<xs:element type="xs:string" name="CodeAssetTypeID" minOccurs="0"/>
<xs:element type="xs:string" name="FinancialContractID" minOccurs="0"/>
<xs:element type="xs:string" name="Make" minOccurs="0"/>
<xs:element type="xs:string" name="ModelNumber" minOccurs="0"/>
<xs:element type="xs:string" name="CCC_LeaseVendor" minOccurs="0"/>
<xs:element type="xs:short" name="CCC_ModelYear" minOccurs="0"/>
<xs:element type="xs:string" name="CCC_CustomerReference" minOccurs="0"/>
<xs:element type="xs:long" name="CCC_Equip_AP_Coding" minOccurs="0"/>
<xs:element type="xs:string" name="CCC_DriverAddress" minOccurs="0"/>
<xs:element type="xs:string" name="CCC_DriverCity" minOccurs="0"/>
<xs:element type="xs:string" name="CCC_DriverStateProvince" minOccurs="0"/>
<xs:element type="xs:string" name="CCC_DriverZipPostalCode" minOccurs="0"/>
<xs:element type="xs:string" name="CCC_DriverEmailAddress" minOccurs="0"/>
<xs:element type="xs:string" name="CCC_DriverFirstName" minOccurs="0"/>
<xs:element type="xs:string" name="CCC_DriverLastName" minOccurs="0"/>
<xs:element type="xs:string" name="CCC_DriverMiddleName" minOccurs="0"/>
<xs:element type="xs:string" name="CCC_FleetBusinessUnit" minOccurs="0"/>
<xs:element type="xs:string" name="CCC_FleetClientAssetID" minOccurs="0"/>
<xs:element type="xs:string" name="CCC_FleetUseType" minOccurs="0"/>
<xs:element type="xs:string" name="DispositionDate" minOccurs="0"/>
<xs:element type="xs:float" name="AssetSalePrice" minOccurs="0"/>
<xs:element type="xs:string" name="InServiceDate" minOccurs="0"/>
</xs:sequence>
<xs:attribute type="xs:string" name="ClientID" use="optional"/>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>