SSIS - XML Source Issue with ":" in attribute name.

  • I have a package that imports and transforms xml files provided by a third party vendor. This process has been failing since the vendor changed attribute names in the XML root. The error I am getting is :

    [XML Source [1283]] Error: The component "XML Source" (1283) was unable to read the XML data. The ':' character, hexadecimal value 0x3A, cannot be included in a name. Line 2, position 95.

    Looking at the xml file it seem to be referring to the fact that the attribute name has a ":" in it :

    <myxxxxxfeedsFeed version="1.0" timestamp="1415274068954" vend.jobrunner:myxxxxxfeeds-feed-job:jar:39.0.21="1346361368143" vend.jobrunner:myxxxxxfeeds-feed-job:jar:39.0.21="1415181005527" vend.jobrunner:myxxxxxfeeds-feed-job:jar:39.0.21="1415150563518" vend.jobrunner:myxxxxxfeeds-feed-job:jar:39.0.21="1415150563472" vend.jobrunner:myxxxxxfeeds-feed-job:jar:39.0.21="1415120627187" >

    Looking at the last successful file that loaded the attributes looked like this:

    <myxxxxxfeeds version="1.0" timestamp="1397742286114" cci="1346361368143" lci="1397664913644" ni="1397624288009" doi="1397624287994" hdi="1397594321521" >

    Vendor tells ":" are allowed. Wanted to see if this is a limitation in the "XML Source" task and if there was any way to get over this.

  • Any movement on this issue. I have the same problem.

    Error at data Flow task [XML Source [620]]: There was an error setting up the mapping. Invalid 'name' attribute value 'xml:id': The ':' character, hexadecimal value 0x3A, at position 3 within the name, cannot be included in a name.'.

    this is referring to the attribute xml:id in the following xml

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?><component xmlns="http://www.wiley.com/namespaces/wiley" type="serialArticle" version="2.0" xml:id="acel12293" xml:lang="en">

    the xsd is defined as

    <xs:attribute name="xmlns" type="xs:string"></xs:attribute>

    <xs:attribute name="type" type="xs:string"></xs:attribute>

    <xs:attribute name="version" type="xs:int"></xs:attribute>

    <xs:attribute name="xml:id" type="xs:string"></xs:attribute>

    <xs:attribute name="xml:lang" type="xs:string"></xs:attribute>

    and xml:id is a valid name according to

    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"

    Not sure what i need to do. Do i need to remove these 'invalid' tags from the file first?

    thanks

  • Remove xml: and see if it works. You can remove the below lines as well and check

    <xs:attribute name="xml:id" type="xs:string"></xs:attribute>

    <xs:attribute name="xml:lang" type="xs:string"></xs:attribute>

    Cheers

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply