<Biml xmlns="http://schemas.varigence.com/biml.xsd"> <Connections> <FileConnection Name="XmlFile" FilePath="C:\test\XmlFile.xml" RelativePath="true" /> <FileConnection Name="XmlXsd" FilePath="C:\test\XmlXsd.Xsd" RelativePath="true" /> </Connections> <Packages> <Package Name="Package1" ConstraintMode="Parallel"> <Variables> <Variable Name="SchemaFolder" DataType="String">C:\Schemas\</Variable> </Variables> <Tasks> <Dataflow Name="DataflowTask1"> <Transformations> <XmlSource Name="XMLSource1"> <XmlSchemaFileInput ConnectionName="XmlXsd" /> <FileInput ConnectionName="XmlFile" /> </XmlSource> </Transformations> </Dataflow> </Tasks> <Connections> <Connection ConnectionName="XmlXsd"> <Expressions> <Expression PropertyName="XmlXsd.ConnectionString"> @[User::SchemaFolder] + "GetDTSColumns.xsd"</Expression> </Expressions> </Connection> </Connections> </Package> </Packages> </Biml>
This snippet shows how to set the file path of a XML Schema that is set from a package variable. Notice that two file connections are declared under the Biml root node. One for the XML schema and one for the XML file. The XSD file path is set in the Connections node inside the Package node, by setting the file connections ConnectionString property with an expression.
Comments
arun
5:49am 04.21.16
Hi Paul, I am trying to load an XML File to a database table, XML has the nodes as (EmpID, Name, Address1 and Address2) , I wanted to load this into Two tables Employee(EmpID,Name) and EmployeeAddress(EmplD,Address1,Address2)
Problem I'm Facing: When i'm trying to Input Path for OLEDB destination its throwing Error in ,Im using the below code, Can you please help on identifying the issue
Frans4
7:11am 11.09.17
Hi Arun, the output path of the XmlSource component is named "ROW" instead of "Output". It confused me, too!
Frans4
7:11am 11.09.17
Hi Arun, the output path of the XmlSource component is named "ROW" instead of "Output". It confused me, too!