XMl in SSIs
How to merge Two XMl files with specified columns eg: file1: assume tht i have file like this <eno>1</eno> <ena>raj</ena> <dept>10</dept> file 2: <dept>10</dept> <deptName>Accounts</deptname> <loc>HYD</loc> Output should be like this when you perform XML task by ussing opetion type merger in ssis how? some one of you tell me? how to do this task Eno ena dept deptname loc VenuShakamuri
May 16th, 2012 1:29am

Are you trying to create a new XML file or are you trying to load these into a SQL table?Russel Loski, MCT, MCITP Business Intelligence Developer and Database Developer 2008 Blog: http://www.bidn.com/blogs/RussLoski/ Twitter: @sqlmovers
Free Windows Admin Tool Kit Click here and download it now
May 16th, 2012 4:50am

i am trying to create a new xml FIleVenuShakamuri
May 16th, 2012 6:20am

Hello, Check out the blog below. It may help you. http://blogs.msdn.com/b/mattm/archive/2007/12/11/using-xml-source.aspx
Free Windows Admin Tool Kit Click here and download it now
May 16th, 2012 6:21am

This blog shows how to merge two XML files and make use of a single XML inorder to make the process simpler. Here XMLDocument is used in order to transfer the nodes from one XML to the other. So first step is to open the XML using the XML Document as shown below System.Xml.XmlDocument objFirstXML = new XmlDocument(); objFirstXML.Load("C:\\temp\\XML1.xml"); Similar way we open the second XML using the XMLDocument. System.Xml.XmlDocument objSecondXML = new XmlDocument(); objSecondXML.Load("C:\\temp\\XML2.xml"); Here once we open the xml now search for the node and then append it to the main one XmlNode objInsert = objFirstXML.SelectSingleNode("/XMLROOT/CHILD"); foreach( XmlNode objNode in objInsert.SelectNodes("/XMLROOT/CHILD/CHILDITEM")) { objInsert.AppendChild(objSecondXML.ImportNode(objNode,true)); } objFirstXML.Save("C:\\temp\\Merged.xml"); you can take script task or script componet through follow above procedure.i think it may help you. indu
May 16th, 2012 6:27am

thnks,But i want to use Only XML task,please tell me the xpath query for merging two xml file into oneaVenuShakamuri
Free Windows Admin Tool Kit Click here and download it now
May 16th, 2012 6:43am

Hi VenuShakamuri, XPath uses path expressions to select nodes or node-sets in an XML document. For more information about it, please refer to: http://www.w3schools.com/xpath/xpath_syntax.asp http://www.w3.org/TR/xpath/ Since here is mainly focus on discussing Integration Services issue, I suggest you post the question to XML forum: http://w3schools.invisionzone.com/index.php?showforum=7 Thanks, Eileen
May 18th, 2012 3:03am

thnks EileenVenuShakamuri
Free Windows Admin Tool Kit Click here and download it now
May 21st, 2012 12:59am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics