Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

The Component "XML Source" Was unable to process the XML data. ambiguous complextype definition. The Element '%' has multiple members named '%'

$
0
0

Hi All,

I am trying to load the XMl file using SSIS. I have My Sample XML and corresponding XSD.

In my SSIS package XML Soruce, provided the Input XML File path and XSD path and when i am tryng to see the columns then i was getting the below error

"

The Component "XML Source" Was unable to process the XML data.  ambiguous complextype definition. The Element 'childusages' has multiple members named 'usages'

"

**And i tried validating the XML and corresponding XSD with .Net(C# or VB) and it passed the validation

Please let me know if anyone knows the issue

-Thanks in Advacne

Sample XML File:

<gmx-rcc>
<statement>
 <summaryAccountName>test test</summaryAccountName>
 <accounts>
  <account>
   <accountnumber>abcdefghijk</accountnumber>
   <meters>
    <meter>
     <mnumber>a123456</mnumber>
     <usages>
      <usage>
      <actualUsage>1234</actualUsage>
      <childUsages>
       <usage><actualUsage>1234</actualUsage></usage>
       <usage><actualUsage>1234</actualUsage></usage>
       <usage><actualUsage>1234</actualUsage></usage>
      </childUsages>
      </usage>
     </usages>
    </meter>
   </meters>
  </account>
 </accounts>
</statement>
</gmx-rcc>

Corresponding XSD:

<xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="gmx-rcc">
 <xsd:complexType >
  <xsd:sequence maxOccurs="unbounded" minOccurs="0">
   <xsd:element type="statement" name="statement"/>
  </xsd:sequence>
 </xsd:complexType>
</xsd:element>
<xsd:complexType name="statement" >
 <xsd:choice maxOccurs="unbounded" minOccurs="0">
  <xsd:element name="summaryAccountName" type="xsd:string"/>
  <xsd:element ref="accounts"/>
 </xsd:choice>
</xsd:complexType>
<xsd:element name="accounts">
 <xsd:complexType>
  <xsd:sequence maxOccurs="unbounded" minOccurs="0">
   <xsd:element name="account" type="account"/>
  </xsd:sequence>
 </xsd:complexType>
</xsd:element>
<xsd:complexType name="account" >
 <xsd:choice maxOccurs="unbounded" minOccurs="0">
  <xsd:element name="accountnumber" type="xsd:string"/>
  <xsd:element ref="meters"/>
 </xsd:choice>
</xsd:complexType>
<xsd:element name="meters">
 <xsd:complexType>
  <xsd:sequence maxOccurs="unbounded" minOccurs="0">
   <xsd:element name="meter" type="meter"/>
  </xsd:sequence>
 </xsd:complexType>
</xsd:element>
<xsd:complexType name="meter" >
 <xsd:choice maxOccurs="unbounded" minOccurs="0">
  <xsd:element name="mnumber" type="xsd:string"/>
  <xsd:element ref="usages"/>
 </xsd:choice>
</xsd:complexType>

<xsd:element name="usages">
 <xsd:complexType>
  <xsd:sequence maxOccurs="unbounded" minOccurs="0">
   <xsd:element name="usage" type="usage"/>
  </xsd:sequence>
 </xsd:complexType>
</xsd:element>
<xsd:complexType name="usage" >
 <xsd:choice maxOccurs="unbounded" minOccurs="0">
  <xsd:element name="actualUsage" type="xsd:decimal"/>
  <xsd:element ref="childUsages"/>
 </xsd:choice>
</xsd:complexType>
<xsd:element name="childUsages">
 <xsd:complexType >
  <xsd:sequence maxOccurs="unbounded" minOccurs="0">
   <xsd:element name="usage" type="usage"/>
  </xsd:sequence>
 </xsd:complexType>
</xsd:element>
</xsd:schema>




Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>