hi all <BR><BR>Now i had updated manually the authors records into xml.<BR>but i want each au_id tag as one record.<BR><BR>how to do it.<BR><BR>by giving this code:- <BR><BR>SqlConnection conn = new SqlConnection("server=system-5;database=pubs;uid=sa;pwd=sa;"); <BR>SqlDataAdapter sda = new SqlDataAdapter("select * from authors",conn); <BR>DataSet ds= new DataSet(); <BR><BR>sda.Fill(ds,"authors"); <BR><BR> <BR><BR> /// xml part <BR><BR>XmlElement ele1; <BR>XmlNode xnode1; <BR>XmlText xtext1; <BR><BR>XmlDocument xdoc = new XmlDocument(); <BR>xnode1=xdoc.CreateNode(XmlNodeType.XmlDeclarat ion,"",""); <BR>xdoc.AppendChild(xnode1); <BR><BR>ele1=xdoc.CreateElement("","ROOT",""); <BR>xdoc.AppendChild(ele1); <BR> <BR>for (int i=0;i&#060;ds.Tables[0].Rows.Count;i++) <BR>{ <BR>for (int j=0;j&#060;ds.Tables[0].Columns.Count;j++) <BR>{ <BR>ele1= xdoc.CreateElement(ds.Tables[0].Columns[j].ToString()); <BR>xtext1=xdoc.CreateTextNode(ds.Tables[0].Rows[i][j].ToString()); <BR>ele1.AppendChild(xtext1); <BR>//ele1.SetAttribute(ds.Tables[0].Columns[1].ToString(),ds.Tables[0].Rows[i][0].ToString()); <BR><BR> xdoc.ChildNodes.Item(1).AppendChild(ele1); <BR> } <BR>} <BR>xdoc.Save(@"c:authors.xml"); <BR><BR><BR>But i didn&#039;t get expansion for each &#060;au_id&#062; tag. <BR><BR>in this code only one expansion is there that is &#060;ROOT&#062;. <BR> &#060;?xml version="1.0" ?&#062; <BR>- &#060;ROOT&#062; <BR> &#060;au_id&#062;172-32-1176&#060;/au_id&#062; <BR> &#060;au_lname&#062;White&#060;/au_lname&#062; <BR> &#060;au_fname&#062;Johnson&#060;/au_fname&#062; <BR> &#060;phone&#062;408 496-7223&#060;/phone&#062; <BR> &#060;address&#062;10932 Bigge Rd.&#060;/address&#062; <BR> &#060;city&#062;Menlo Park&#060;/city&#062; <BR> &#060;state&#062;CA&#060;/state&#062; <BR> &#060;zip&#062;94025&#060;/zip&#062; <BR> &#060;contract&#062;True&#060;/contract&#062; <BR> &#060;au_id&#062;213-46-8915&#060;/au_id&#062; <BR> &#060;au_lname&#062;Green&#060;/au_lname&#062; <BR> &#060;au_fname&#062;Marjorie&#060;/au_fname&#062; <BR> &#060;phone&#062;415 986-7020&#060;/phone&#062; <BR> &#060;address&#062;309 63rd St. #411&#060;/address&#062; <BR> &#060;city&#062;Oakland&#060;/city&#062; <BR> &#060;state&#062;CA&#060;/state&#062; <BR> &#060;zip&#062;94618&#060;/zip&#062; <BR> &#060;contract&#062;True&#060;/contract&#062; <BR>&#060;/root&#062; <BR><BR>can any one give me the idea to do this. <BR><BR>thanks again <BR>bye <BR>ulaga <BR>