0

SSIS使用 XML 源组件加载 XML 文件时,生成 XSD 时出现错误

示例 XML 是:

<Item>
    <ASIN>B00029JKM8</ASIN>
    <SalesRank>682039</SalesRank> -<SmallImage xmlns:aws="http://webservices.amazon.com/AWSECommerceService">
    <aws:URL>http://ecx.images-amazon.com/images/I/41dpFT6%2Bz8L._SL75_.jpg</aws:URL>
    <aws:Height Units="pixels">75</aws:Height>
    <aws:Width Units="pixels">75</aws:Width>
    </SmallImage> -<MediumImage xmlns:aws="http://webservices.amazon.com/AWSECommerceService">
        <aws:URL>http://ecx.images-amazon.com/images/I/41dpFT6%2Bz8L._SL160_.jpg</aws:URL>
        <aws:Height Units="pixels">160</aws:Height>
        <aws:Width Units="pixels">160</aws:Width>
        </MediumImage> -<LargeImage xmlns:aws="http://webservices.amazon.com/AWSECommerceService">
            <aws:URL>http://ecx.images-amazon.com/images/I/41dpFT6%2Bz8L.jpg</aws:URL>
            <aws:Height Units="pixels">500</aws:Height>
            <aws:Width Units="pixels">500</aws:Width>
            </LargeImage> -<ItemAttributes>
                <BaseUnit Units="Item">1</BaseUnit>
                <BaseUnitCount>1</BaseUnitCount>
                <Binding>Misc.</Binding>
                <Brand>High Cotton, Inc.</Brand> -<BuyBoxOffer> -<SavingsBasis>
                <Amount>1700</Amount>
                <CurrencyCode>USD</CurrencyCode>
                <FormattedPrice>$17.00</FormattedPrice>
                </SavingsBasis> -<BuyingPrice>
                    <Amount>1998</Amount>
                    <CurrencyCode>USD</CurrencyCode>
                    <FormattedPrice>$19.98</FormattedPrice>
                </BuyingPrice>
                <MerchantId>A1G29CW22J5UU0</MerchantId>
            </BuyBoxOffer>
            <EAN>0638190911099</EAN>
            <Feature>This sign is lovingly screen printed on manufactured wood substrate.</Feature>
            <Feature>Sign measures 16" x 3.5" x .5"</Feature>
            <Feature>This decorative sign/plaque comes ready to hang above a door frame or on a wall.</Feature>
            <Feature>Perfect for home or office.</Feature>
            <Feature>Makes a great gift.</Feature> -<ItemDimensions>
            <Height Units="hundredths-inches">350</Height>
            <Length Units="hundredths-inches">1600</Length>
            <Weight Units="hundredths-pounds">100</Weight>
            <Width Units="hundredths-inches">50</Width>
        </ItemDimensions>
        <Label>High Cotton Inc</Label> -<ListPrice>
        <Amount>1700</Amount>
        <CurrencyCode>USD</CurrencyCode>
        <FormattedPrice>$17.00</FormattedPrice>
    </ListPrice>
    <Manufacturer>High Cotton Inc</Manufacturer>
    <Model>S911</Model>
    <MPN>S911</MPN> -<PackageDimensions>
    <Height Units="hundredths-inches">200</Height>
    <Length Units="hundredths-inches">900</Length>
    <Weight Units="hundredths-pounds">100</Weight>
    <Width Units="hundredths-inches">900</Width>
</PackageDimensions>
<PackageQuantity>1</PackageQuantity>
<ProductGroup>Home</ProductGroup>
<ProductTypeName>HOME</ProductTypeName>
<Publisher>High Cotton Inc</Publisher>
<Studio>High Cotton Inc</Studio>
<Title>High Cotton Clean Yesterday Sign Plaque</Title>
<UPC>638190911099</UPC>
</ItemAttributes> -<EditorialReviews> -<EditorialReview>
    <Source>Product Description</Source>
    <Content>"The house was clean yesterday. Sorry you missed it." This humorous wooden sign from High Cotton, Inc. and Mary Phillips Designs®, is lovingly screen printed on manufactured wood substrate. Each plaque comes ready to hang and incite laughter. 16" x 3.5" x .5".</Content>
    <IsLinkSuppressed>0</IsLinkSuppressed>
</EditorialReview>
</EditorialReviews> -<BrowseNodes> -<BrowseNode>
    <BrowseNodeId>3736041</BrowseNodeId>
    <Name>Plaques</Name> -<Ancestors> -<BrowseNode>
    <BrowseNodeId>3735061</BrowseNodeId>
    <Name>Home Décor Accents</Name> -<Ancestors> -<BrowseNode>
    <BrowseNodeId>1063278</BrowseNodeId>
    <Name>Home Décor</Name> -<Ancestors> -<BrowseNode>
    <BrowseNodeId>1063498</BrowseNodeId>
    <Name>Categories</Name> -<Ancestors> -<BrowseNode>
    <BrowseNodeId>1055398</BrowseNodeId>
    <Name>Home & Kitchen</Name>
</BrowseNode>
</Ancestors>
</BrowseNode>
</Ancestors>
</BrowseNode>
</Ancestors>
</BrowseNode>
</Ancestors>
</BrowseNode> -<BrowseNode>
<BrowseNodeId>13900821</BrowseNodeId>
<Name>Kitchen & Dining Features</Name> -<Children> -<BrowseNode>
<BrowseNodeId>51552011</BrowseNodeId>
<Name>Featured Categories</Name>
</BrowseNode>
</Children> -<Ancestors> -<BrowseNode>
<BrowseNodeId>1055398</BrowseNodeId>
<Name>Home & Kitchen</Name>
</BrowseNode>
</Ancestors>
</BrowseNode>
</BrowseNodes> -<PriceSummary> -<AmazonPrice isFBA="true">
    <Amount>1700</Amount>
    <Availability>Temporarily out of stock. Order now and we'll deliver when available. We'll e-mail you with an estimated delivery date as soon as we have more information. Your credit card will not be charged until we ship the item.</Availability>
    <AvailabilityMinHours>672</AvailabilityMinHours>
    <AvailabilityMaxHours>1008</AvailabilityMaxHours>
    <SalesRestriction/>
    <MerchantID>ATVPDKIKX0DER</MerchantID>
    <MerchantName>Amazon.com</MerchantName>
    <GlancePage>http://www.amazon.com/gp/help/seller/home.html?seller=ATVPDKIKX0DER</GlancePage> -<ShippingCharge>
    <ShippingType>StandardShipping</ShippingType> -<ShippingPrice>
    <Amount>574</Amount>
    <CurrencyCode>USD</CurrencyCode>
    <FormattedPrice>$5.74</FormattedPrice>
    </ShippingPrice>
    </ShippingCharge>
    <IsEligibleForSuperSaverShipping>1</IsEligibleForSuperSaverShipping>
    <IsEligibleForPrime>1</IsEligibleForPrime>
    <IsFulfilledByAmazon>1</IsFulfilledByAmazon>
    <DetailPageUrl>http://www.amazon.com/dp/B00029JKM8/ref=asc_df_B00029JKM82546709?smid=ATVPDKIKX0DER&tag=INSERT_TAG_HERE&linkCode=asn&creative=395093&creativeASIN=B00029JKM8</DetailPageUrl>
    </AmazonPrice> -<BuyBoxPrice isFBA="false" type="featured_merchant" isAmazonOffer="false">
        <Amount>1998</Amount>
        <Availability>Usually ships in 4-5 business days</Availability>
        <AvailabilityMinHours>96</AvailabilityMinHours>
        <AvailabilityMaxHours>120</AvailabilityMaxHours>
        <SalesRestriction/>
        <MerchantID>A1G29CW22J5UU0</MerchantID>
        <MerchantName>Get Organized</MerchantName>
        <GlancePage>http://www.amazon.com/gp/help/seller/home.html?seller=A1G29CW22J5UU0</GlancePage> -<ShippingCharge>
        <ShippingType>StandardShipping</ShippingType> -<ShippingPrice>
        <Amount>495</Amount>
        <CurrencyCode>USD</CurrencyCode>
        <FormattedPrice>$4.95</FormattedPrice>
        </ShippingPrice>
        </ShippingCharge>
        <IsEligibleForSuperSaverShipping>0</IsEligibleForSuperSaverShipping>
        <IsEligibleForPrime>0</IsEligibleForPrime>
        <IsFulfilledByAmazon>0</IsFulfilledByAmazon>
        <DetailPageUrl>http://www.amazon.com/dp/B00029JKM8/ref=asc_df_B00029JKM82546709?smid=A1G29CW22J5UU0&tag=INSERT_TAG_HERE&linkCode=asn&creative=395105&creativeASIN=B00029JKM8</DetailPageUrl>
        </BuyBoxPrice> -<FMPrice isFBA="true" type="featured_merchant" isAmazonOffer="true">
            <Amount>1700</Amount>
            <Availability>Temporarily out of stock. Order now and we'll deliver when available. We'll e-mail you with an estimated delivery date as soon as we have more information. Your credit card will not be charged until we ship the item.</Availability>
            <AvailabilityMinHours>672</AvailabilityMinHours>
            <AvailabilityMaxHours>1008</AvailabilityMaxHours>
            <SalesRestriction/>
            <MerchantID>ATVPDKIKX0DER</MerchantID>
            <MerchantName>Amazon.com</MerchantName>
            <GlancePage>http://www.amazon.com/gp/help/seller/home.html?seller=ATVPDKIKX0DER</GlancePage> -<ShippingCharge>
            <ShippingType>StandardShipping</ShippingType> -<ShippingPrice>
            <Amount>574</Amount>
            <CurrencyCode>USD</CurrencyCode>
            <FormattedPrice>$5.74</FormattedPrice>
            </ShippingPrice>
            </ShippingCharge>
            <IsEligibleForSuperSaverShipping>1</IsEligibleForSuperSaverShipping>
            <IsEligibleForPrime>1</IsEligibleForPrime>
            <IsFulfilledByAmazon>1</IsFulfilledByAmazon>
            <DetailPageUrl>http://www.amazon.com/dp/B00029JKM8/ref=asc_df_B00029JKM82546709?smid=ATVPDKIKX0DER&tag=INSERT_TAG_HERE&linkCode=asn&creative=395093&creativeASIN=B00029JKM8</DetailPageUrl>
            </FMPrice> -<ItemPrice isFBA="true" type="featured_merchant" isAmazonOffer="true">
                <Amount>1700</Amount>
                <Availability>Temporarily out of stock. Order now and we'll deliver when available. We'll e-mail you with an estimated delivery date as soon as we have more information. Your credit card will not be charged until we ship the item.</Availability>
                <AvailabilityMinHours>672</AvailabilityMinHours>
                <AvailabilityMaxHours>1008</AvailabilityMaxHours>
                <SalesRestriction/>
                <MerchantID>ATVPDKIKX0DER</MerchantID>
                <MerchantName>Amazon.com</MerchantName>
                <GlancePage>http://www.amazon.com/gp/help/seller/home.html?seller=ATVPDKIKX0DER</GlancePage> -<ShippingCharge>
                <ShippingType>StandardShipping</ShippingType> -<ShippingPrice>
                <Amount>574</Amount>
                <CurrencyCode>USD</CurrencyCode>
                <FormattedPrice>$5.74</FormattedPrice>
                </ShippingPrice>
                </ShippingCharge>
                <IsEligibleForSuperSaverShipping>1</IsEligibleForSuperSaverShipping>
                <IsEligibleForPrime>1</IsEligibleForPrime>
                <IsFulfilledByAmazon>1</IsFulfilledByAmazon>
                <DetailPageUrl>http://www.amazon.com/dp/B00029JKM8/ref=asc_df_B00029JKM82546709?smid=ATVPDKIKX0DER&tag=INSERT_TAG_HERE&linkCode=asn&creative=395093&creativeASIN=B00029JKM8</DetailPageUrl>
                </ItemPrice> -<ThirdPartyNewPrice isFBA="false" type="featured_merchant">
                    <Amount>1998</Amount>
                    <Availability>Usually ships in 4-5 business days</Availability>
                    <AvailabilityMinHours>96</AvailabilityMinHours>
                    <AvailabilityMaxHours>120</AvailabilityMaxHours>
                    <SalesRestriction/>
                    <MerchantID>A1G29CW22J5UU0</MerchantID>
                    <MerchantName>Get Organized</MerchantName>
                    <GlancePage>http://www.amazon.com/gp/help/seller/home.html?seller=A1G29CW22J5UU0</GlancePage> -<ShippingCharge>
                    <ShippingType>StandardShipping</ShippingType> -<ShippingPrice>
                    <Amount>495</Amount>
                    <CurrencyCode>USD</CurrencyCode>
                    <FormattedPrice>$4.95</FormattedPrice>
                    </ShippingPrice>
                    </ShippingCharge>
                    <IsEligibleForSuperSaverShipping>0</IsEligibleForSuperSaverShipping>
                    <IsEligibleForPrime>0</IsEligibleForPrime>
                    <IsFulfilledByAmazon>0</IsFulfilledByAmazon>
                    <DetailPageUrl>http://www.amazon.com/dp/B00029JKM8/ref=asc_df_B00029JKM82546709?smid=A1G29CW22J5UU0&tag=INSERT_TAG_HERE&linkCode=asn&creative=395105&creativeASIN=B00029JKM8</DetailPageUrl>
                    </ThirdPartyNewPrice>
                    </PriceSummary>
                    <ParentASIN/> -<Description>
                        <Abstract>Buy High Cotton Clean Yesterday Sign Plaque from Amazon.com!</Abstract>
                        <Promotion>Get free shipping on orders over $25!</Promotion>
                        <UsedUrl>http://www.amazon.com/gp/offer-listing/B00029JKM8/ref=asc_df_B00029JKM82546709?ie=UTF8&condition=used&tag=INSERT_TAG_HERE&creative=395213&creativeASIN=B00029JKM8&linkCode=asm</UsedUrl>
                        <OfferUrl>http://www.amazon.com/gp/offer-listing/B00029JKM8/ref=asc_df_B00029JKM82546709?ie=UTF8&condition=new&tag=INSERT_TAG_HERE&creative=395165&creativeASIN=B00029JKM8&linkCode=asm</OfferUrl>
                        <MarketplaceURL>http://www.amazon.com/gp/product/B00029JKM8/ref=asc_df_B00029JKM82546709?s=merchant&m=&v=glance&tag=INSERT_TAG_HERE&creative=395069&linkCode=asn&creativeASIN=B00029JKM8</MarketplaceURL>
                        <AmazonUrl>http://www.amazon.com/dp/B00029JKM8/ref=asc_df_B00029JKM82546709/?tag=INSERT_TAG_HERE&creative=394997&creativeASIN=B00029JKM8&linkCode=asn</AmazonUrl>
                        <Url>http://www.amazon.com/dp/B00029JKM8/ref=asc_df_B00029JKM82546709?tag=INSERT_TAG_HERE&creative=395261&creativeASIN=B00029JKM8&linkCode=asn</Url>
                        <ShortDescription>This sign is lovingly screen printed on manufactured wood substrate. Sign measures 16" x 3.5" x .5" This decorative sign/plaque comes ready to hang above a door frame or on a wall. Perfect for home or office. Makes a great gift.</ShortDescription>
                        <LongDescription>"The house was clean yesterday. Sorry you missed it." This humorous wooden sign from High Cotton, Inc. and Mary Phillips Designs®, is lovingly screen printed on manufactured wood substrate. Each plaque comes ready to hang and incite laughter. 16" x 3.5" x .5".</LongDescription>
                        </Description>
                        </Item>
4

1 回答 1

0

SSIS 不能处理多个命名空间。尝试 XML 任务并使用 XSLT 简化 xml。

或者您可以使用记事本删除命名空间。

  <SmallImage xmlns:aws="http://webservices.amazon.com/AWSECommerceService"></SmallImage> -<MediumImage xmlns:aws="http://webservices.amazon.com/AWSECommerceService">
    <aws:URL>http://ecx.images-amazon.com/images/I/41dpFT6%2Bz8L._SL160_.jpg</aws:URL>
    <aws:Height Units="pixels">160</aws:Height>
    <aws:Width Units="pixels">160</aws:Width>
    </MediumImage> -<LargeImage xmlns:aws="http://webservices.amazon.com/AWSECommerceService">
于 2013-07-10T09:30:04.983 回答