SSIS XMLSource only seeing null values in XML variable

后端 未结 2 1401
伪装坚强ぢ
伪装坚强ぢ 2021-01-20 10:21

I have a Data Flow task with an XMLSource that references an XML Variable. The DataFlow task does recognize that there are x number of rows in the variable, but it only sees

2条回答
  •  滥情空心
    2021-01-20 11:00

    I discovered a way to get the values to populate... I'll post it here without giving myself points, in case anyone else encounters the same problem. This is just a "how to fix", but I'll give credit to anyone who can explain the "deeper whys".

    Essentially, the XML needed to be wrapped in another root node:

    
    
       
          bacon
          roasted
          pork
          edamame
       
    
    

    Even though the original XML I used was valid, SSIS wanted it to be wrapped in an additional root node, which I named datarows. Once I did that the package recognized the word values and completed successfully.

    alt text

    The associated schema:

    
    
      
        
          
            
              
                
                  
                
              
            
          
        
      
    
    

提交回复
热议问题