简体   繁体   中英

XML Outputs in Visual C#

I used this method (serialization) to create data (skills) into a combo-box. I can select a player, a skill rate it and then save a comment and it writes to an xml skill.

I am hoping to be able to do this for multiple combo-boxes (one for each skill) or, be able to choose a different skill in 1 combo-box, rate it and write it until all skills have a rating and are written.

Currently, I can only save 1 skills to 1 user. I have 12 skills and I'd like to rate each one and save it to an XML document.

If I do it for 1 person, 1 skill and 1 rating it works. But if I change person, change skill and rate the skill, it overwrites the existing XML document.

So how can I easily successfully write Multiple XML's (or multiple players) with multiple skills and ratings?

1 document could = Player Name, 12 skills aka (Standard, pop, push etc) (its football skills), with a rating for each of the 12 skills?

See my full answer in following post : how do I generate data from an xml file in html . The class below uses a List to create an array of elements.

 [XmlRoot("root")] public class Root { [XmlElement("element")] public List<Element> elements {get;set;} } 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM