EDN Admin
Well-known member
Hi All,
I am having trouble with pulling xml data from a xml file and load into a sql table.
XSD file was generated using xml source in SSIS data flow.
This is how it looks like. When I click Columns tab in XML source editor, I can see only two output names in the drop down box. There are 3 elements in XSD file.
I dont see MyResponseFile output with following columns names; SchemaVersion,ProcessingDate,FileProcessingStatusCode,FileProcessingMessageText and NumberOfRecords.
1. MyResponseFile
2. MyResponse
3. MyErrorDetails
Here is the XML file:
<span style="font-size:x-small; color:#808080 <span style="font-size:x-small; color:#808080
<pre><?xml version="1.0" encoding="utf-8" ?>
- <MYResponseFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SchemaVersion="2.0" ProcessingDate="2011-11-14" FileProcessingStatusCode="0" FileProcessingMessageText="The file with 153 loan(s) has been processed. There were 33 loan(s) with errors.135 loan(s) had warnings." NumberOfRecords="153" xmlns="https://www.MYadmin.com/schemas
- <MYResponse TransactionTypeCode="1" ServicerNumber="xxxx187" ServicerLoanNumber="xxx32" ProcessingStatusCode="1
<MYErrorDetail AttributeName="PostModificationDetail.ProductTypeCode" AttributeValue="3" ErrorMessage="Warning:[LIR-124] - Step Principal ." />
<MYErrorDetail AttributeName="PostModificationDetail.ProductTypeCode" AttributeValue="3" ErrorMessage="Warning:[LIR-128] - Step Payment Due Date after modification + 60 months." />
<MYErrorDetail AttributeName="PostModificationDetail.ProductTypeCode" AttributeValue="3" ErrorMessage="Warning:[LIR-129] - New Interest to the last step." />
<MYErrorDetail AttributeName="PostModificationDetail.ProductTypeCode" AttributeValue="3" ErrorMessage="Warning:[LIR-130] - Difference ust be equal to 12 months." />
<MYErrorDetail AttributeName="PostModificationDetail.ProductTypeCode" AttributeValue="3" ErrorMessage="Warning:[LIR-137] - Step Rate p Schedule." />
<MYErrorDetail AttributeName="PostModificationDetail.ProductTypeCode" AttributeValue="3" ErrorMessage="Warning:[LIR-141] - Step Paymentfective date of the previous schedule." />
<MYErrorDetail AttributeName="PostModificationDetail.ProductTypeCode" AttributeValue="3" ErrorMessage="Warning:[LIR-143] - Step PrinciPrincipal and Interest Payment of ." />
<MYErrorDetail AttributeName="PostModificationDetail.ProductTypeCode" AttributeValue="3" ErrorMessage="Warning:[LIR-148] - The differenan 1%." />
<MYErrorDetail AttributeName="PostModificationDetail.AmortizationTerm" AttributeValue="480" ErrorMessage="Warning:[LIR-152] - Amortizationll steps plus the th period." />
<MYErrorDetail AttributeName="PostModificationDetail.ProductTypeCode" AttributeValue="3" ErrorMessage="Warning:[LIR-170] - Step Durationnus the initial period." />
<MYErrorDetail AttributeName="PrincipalForgivenAmount" AttributeValue="0.00" ErrorMessage="Error:[LIR-358] - TheâPrincipal Write-down (Forgiveness)â if the âPrincipal Reduction Alternative r â3â." />
</MYResponse>
</MYResponseFile>[/code]
<span style="font-size:x-small; color:#808080
<br/>
Here is the XSD file:
<span style="font-size:x-small; color:#0000ff <span style="font-size:x-small; color:#0000ff
<pre><?xml version="1.0"?>
<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="https://www.hmpadmin.com/schemas
<xs:element name="MyResponseFile
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="MyResponse
<xs:complexType>
<xs:sequence minOccurs="0
<xs:element minOccurs="0" maxOccurs="unbounded" name="MyErrorDetail
<xs:complexType>
<xs:attribute name="AttributeName" type="xs:string" use="optional" />
<xs:attribute name="AttributeValue" type="xs:string" use="optional" />
<xs:attribute name="ErrorMessage" type="xs:string" use="optional" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="TransactionTypeCode" type="xs:unsignedByte" use="optional" />
<xs:attribute name="ServicerNumber" type="xs:unsignedInt" use="optional" />
<xs:attribute name="ServicerLoanNumber" type="xs:unsignedInt" use="optional" />
<xs:attribute name="ProcessingStatusCode" type="xs:unsignedByte" use="optional" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="SchemaVersion" type="xs:decimal" use="optional" />
<xs:attribute name="ProcessingDate" type="xs:date" use="optional" />
<xs:attribute name="FileProcessingStatusCode" type="xs:unsignedByte" use="optional" />
<xs:attribute name="FileProcessingMessageText" type="xs:string" use="optional" />
<xs:attribute name="NumberOfRecords" type="xs:unsignedByte" use="optional" />
</xs:complexType>
</xs:element>
</xsd:schema>[/code]
Can anyone tell me how to fix this please?
Or else how do i write a XSLT file for this xml file inorder to get all attributes?
Thanks
<
shamen
<input id="e05db2c8-9589-4227-af4a-96a8ce7e4b0a_attachments" type="hidden" />
<
shamen<br/>
View the full article
I am having trouble with pulling xml data from a xml file and load into a sql table.
XSD file was generated using xml source in SSIS data flow.
This is how it looks like. When I click Columns tab in XML source editor, I can see only two output names in the drop down box. There are 3 elements in XSD file.
I dont see MyResponseFile output with following columns names; SchemaVersion,ProcessingDate,FileProcessingStatusCode,FileProcessingMessageText and NumberOfRecords.
1. MyResponseFile
2. MyResponse
3. MyErrorDetails
Here is the XML file:
<span style="font-size:x-small; color:#808080 <span style="font-size:x-small; color:#808080
<pre><?xml version="1.0" encoding="utf-8" ?>
- <MYResponseFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SchemaVersion="2.0" ProcessingDate="2011-11-14" FileProcessingStatusCode="0" FileProcessingMessageText="The file with 153 loan(s) has been processed. There were 33 loan(s) with errors.135 loan(s) had warnings." NumberOfRecords="153" xmlns="https://www.MYadmin.com/schemas
- <MYResponse TransactionTypeCode="1" ServicerNumber="xxxx187" ServicerLoanNumber="xxx32" ProcessingStatusCode="1
<MYErrorDetail AttributeName="PostModificationDetail.ProductTypeCode" AttributeValue="3" ErrorMessage="Warning:[LIR-124] - Step Principal ." />
<MYErrorDetail AttributeName="PostModificationDetail.ProductTypeCode" AttributeValue="3" ErrorMessage="Warning:[LIR-128] - Step Payment Due Date after modification + 60 months." />
<MYErrorDetail AttributeName="PostModificationDetail.ProductTypeCode" AttributeValue="3" ErrorMessage="Warning:[LIR-129] - New Interest to the last step." />
<MYErrorDetail AttributeName="PostModificationDetail.ProductTypeCode" AttributeValue="3" ErrorMessage="Warning:[LIR-130] - Difference ust be equal to 12 months." />
<MYErrorDetail AttributeName="PostModificationDetail.ProductTypeCode" AttributeValue="3" ErrorMessage="Warning:[LIR-137] - Step Rate p Schedule." />
<MYErrorDetail AttributeName="PostModificationDetail.ProductTypeCode" AttributeValue="3" ErrorMessage="Warning:[LIR-141] - Step Paymentfective date of the previous schedule." />
<MYErrorDetail AttributeName="PostModificationDetail.ProductTypeCode" AttributeValue="3" ErrorMessage="Warning:[LIR-143] - Step PrinciPrincipal and Interest Payment of ." />
<MYErrorDetail AttributeName="PostModificationDetail.ProductTypeCode" AttributeValue="3" ErrorMessage="Warning:[LIR-148] - The differenan 1%." />
<MYErrorDetail AttributeName="PostModificationDetail.AmortizationTerm" AttributeValue="480" ErrorMessage="Warning:[LIR-152] - Amortizationll steps plus the th period." />
<MYErrorDetail AttributeName="PostModificationDetail.ProductTypeCode" AttributeValue="3" ErrorMessage="Warning:[LIR-170] - Step Durationnus the initial period." />
<MYErrorDetail AttributeName="PrincipalForgivenAmount" AttributeValue="0.00" ErrorMessage="Error:[LIR-358] - TheâPrincipal Write-down (Forgiveness)â if the âPrincipal Reduction Alternative r â3â." />
</MYResponse>
</MYResponseFile>[/code]
<span style="font-size:x-small; color:#808080
<br/>
Here is the XSD file:
<span style="font-size:x-small; color:#0000ff <span style="font-size:x-small; color:#0000ff
<pre><?xml version="1.0"?>
<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="https://www.hmpadmin.com/schemas
<xs:element name="MyResponseFile
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="MyResponse
<xs:complexType>
<xs:sequence minOccurs="0
<xs:element minOccurs="0" maxOccurs="unbounded" name="MyErrorDetail
<xs:complexType>
<xs:attribute name="AttributeName" type="xs:string" use="optional" />
<xs:attribute name="AttributeValue" type="xs:string" use="optional" />
<xs:attribute name="ErrorMessage" type="xs:string" use="optional" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="TransactionTypeCode" type="xs:unsignedByte" use="optional" />
<xs:attribute name="ServicerNumber" type="xs:unsignedInt" use="optional" />
<xs:attribute name="ServicerLoanNumber" type="xs:unsignedInt" use="optional" />
<xs:attribute name="ProcessingStatusCode" type="xs:unsignedByte" use="optional" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="SchemaVersion" type="xs:decimal" use="optional" />
<xs:attribute name="ProcessingDate" type="xs:date" use="optional" />
<xs:attribute name="FileProcessingStatusCode" type="xs:unsignedByte" use="optional" />
<xs:attribute name="FileProcessingMessageText" type="xs:string" use="optional" />
<xs:attribute name="NumberOfRecords" type="xs:unsignedByte" use="optional" />
</xs:complexType>
</xs:element>
</xsd:schema>[/code]
Can anyone tell me how to fix this please?
Or else how do i write a XSLT file for this xml file inorder to get all attributes?
Thanks
<
shamen
<input id="e05db2c8-9589-4227-af4a-96a8ce7e4b0a_attachments" type="hidden" />
<
shamen<br/>
View the full article