hi all
i am developing a small application that will allow the user to paste in admin logs which will then be converted into xml data.
The code works fine in VB.net but i am trying to convert it into C# as the application is written in c#
i am having issues with my writer.WriteElementString();
here is the clock of code of what i am trying to do.
StringBuilder sb = new StringBuilder();
XmlWriterSettings settings = new XmlWriterSettings();
settings.Indent = true;
settings.IndentChars = Convert.ToString((char) Keys.Tab);
settings.OmitXmlDeclaration = true;
writer = XmlWriter.Create(sb, settings);
writer.WriteStartElement("Players");
Int16 countme;
foreach (Match match in Regex.Matches(rawdata, pattern))
{
writer.WriteElementString("Admin", match.Groups.Item("Admin"));
writer.WriteElementString("PlayerName", match.Groups.Item("PlayerName").Value);
writer.WriteElementString("PlayerIP", match.Groups.Item("PlayerIP").Value);
writer.WriteElementString("PlayerGuid", match.Groups.Item("PlayerGuid").Value);
writer.WriteElementString("Action", match.Groups.Item("Action").Value);
writer.WriteElementString("Server", match.Groups.Item("Server").Value);
writer.WriteElementString("DateTime", match.Groups.Item("DateTime").Value);
}
The error seems to ly with match.Groups.Item("{VALUE}");
"cannot resolve symbol ITEM"
any help would be gratefull
cheers