Code:
using System;
using System.Collections.Generic;
using System.Xml;
using System.IO;
namespace Organized_Shoplist
{
class Program
{
static void Main(string[] args)
{
XmlReader reader = new XmlTextReader("zitem.xml");
List<string> item = new List<string>();
while (reader.Read())
{
switch (reader.Name)
{
case "ITEM":
item.Add(reader.GetAttribute("id"));
break;
}
}
TextWriter tr = new StreamWriter("shop.xml");
tr.WriteLine("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
tr.WriteLine("<XML id=\"shop\">");
foreach(string i in item) {
tr.WriteLine("<SELL itemid=\"{0}\"/>", item);
tr.Flush();
}
tr.WriteLine("</XML>");
tr.Flush();
tr.Close();
}
}
}
Since you seem to be too lazy to search for a "Shoplist.xml generator".