Convert existing node to xml attributeJJohn9yAsked Jan 11, 2017, 6:07 AM949Learn iOS ProgrammingOutput 1 1 85230830-b0ae-4f20-98f1-f96b62337f14-00000021 Sales Create No Expected Output No
JJohn9y agoPosted Jan 12, 2017, 2:18 AMGotcha objxml.Save(Server.MapPath("Test.xml")); Response.Redirect("Test.xml"); 0
JJohn9y agoPosted Jan 12, 2017, 2:07 AMI m using like this XmlDocument objxml = new XmlDocument(); XmlNode objxmlDecl; objxmlDecl = objxml.CreateNode(XmlNodeType.XmlDeclaration, "", ""); objxml.AppendChild(objxmlDecl); XmlElement objRoot; objRoot = objxml.CreateElement("ENVELOPE"); objxml.AppendChild(objRoot);Console.WriteLine(objxml.InnerXml); how to create an redirect to an xml file now0
Nigel Fernandes9y agoPosted Jan 12, 2017, 12:12 AM You will need to create the xml manually by using a loop ( for / while).0
Nigel Fernandes9y agoPosted Jan 12, 2017, 12:00 AMUsing writeXML will automatically convert columns to nodes. You will have to write a for loop with conditions to make it into attributes. Also you can read this if its helps:http://stackoverflow.com/questions/10231621/how-to-export-a-datatable-to-xml-with-all-columns-as-attributes 0
JJohn9y agoPosted Jan 11, 2017, 11:54 PM MemoryStream str = new MemoryStream(); ds.WriteXml(str); str.Seek(0, SeekOrigin.Begin); StreamReader sr = new StreamReader(str); string xmlstr; xmlstr = sr.ReadToEnd(); this is my code to generate the xml string 0
Nigel Fernandes9y agoPosted Jan 11, 2017, 7:54 PMHi what function are you using to generate the above output ? Can you share your code?0
JohnPosted Jan 12, 2017, 2:18 AM
JohnPosted Jan 12, 2017, 2:07 AM