Hi,
I have generated a sample XML document from the XSD file using XMLSpy and used these in XML Source stage.
While I was parsing/Shredding the XML file and to write to sequential files I got the following error message.
The XML Source Adapter does not support mixed content model on Complex Types.
Additional Information:
Pipeline component has returned HRESULT error code )xC02092A1 from a method call. [Microsoft.SqlServer.DTSPipelineWrap]
Can anybody give a sample code with Complex XML type.
--
Find attached the XSD format. This is FYI.
Not sure I understand the question.
Empty, simple and element-only content models for complex types are supported, but mixed content is not.
Are you asking for a sample of a schema that has one of those content models?
|||Are you able to get my XSD schema attached in my previous question? If not, could you please tell me how to send you the XSD schema
My schema content will be changed based on the instrument type.
For example,
<instrument type='Equity'>
<equityrelatedcolumns>value</equityrelatecolumns>
<pricinglist>
<price1/>
<price2/>
...
...
...
<pricen/>
</pricinglist>
</instrument>
<instrument type='Bond'>
<bondrelatedcolumns>value</bondrelatedcolumns>
<pricinglist>
<price1/>
<price2/>
...
...
...
<pricen/>
</pricinglist>
</instrument>
Current SSIS support for loading XML does not support Complex Types with mixed content models. I looked at the schema provided and noticed several complex types with mixed="true" defined.
However, based on the XML sample provided, it is unclear to me why this is required since known of the element instances contained any non-element content. This would lead me to believe that at least fot the sample provided, you could change the content model on the ComplexTypes to not be mixed to work around the limitation of SSIS.
If this is not feasible, then you will have to preprocess te instance documents with an XSLT to turn the non-element content for the ComplexTypes with mixed content into element conent.
Hope that helps -
Andy
|||Thanks Andy. The XSD file is the correct one. Our original XML file will contain mixed content type only.
We generated sample XML file through XMLSPY and specified NULL for all the contents. That is the reason the XML file looks like simple content.
Hope SSIS next version might look into this issue.
No comments:
Post a Comment