Xml generated with fields & attributes entered by webform

RentaChigament

New Member
i have the following problem!I need to generate an Xml Document in asp.net. For this, i need to enter the following information:- Number of tags.- Name of each tags (example: , , , etc).- Attributes of each tag (example: Alex... etc)..I have already this function that received a List (TAGLIST) with the name of the xml tags.\[code\]public void functionxml(){ string RutaSave = string.Format(@"C:\xml.xml"); var Serializer = new XmlSerializer(typeof(List<string>)); TextWriter textWriter = new StreamWriter(RutaSave); Serializer.Serialize(textWriter, TagsList);}\[/code\]But the xml generated by this function looks like this:\[code\] <?xml version="1.0" encoding="utf-8"?><dictionary> <item> <key> <string>CAMPO1</string> </key> <value> <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">test</anyType> </value> </item> <item> <key> <string>CAMPO2</string> </key> <value> <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">2</anyType> </value> </item></dictionary>\[/code\]Please, any help will be welcome!Thanks in advance.
 
Back
Top