private void CreateAhResourcesXml() { //GotoMenu("1"); CampahStatus.SetStatus("Updating AH Database. Please Wait...", Modes.Updating); AuctionHouse.Items.Clear(); interactionManager.TraverseMenu("1"); interactionManager.CloseMenu(); var tw = new XmlTextWriter("ahresources.xml", null) { Formatting = Formatting.Indented }; tw.WriteStartDocument(); tw.WriteStartElement("AHStructure"); tw.WriteComment("This XML was automatically generated by Campah.exe"); tw.WriteComment("Editing this XML may cause Campah to no longer function properly"); foreach (AhItem item in AuctionHouse.Items.Values) { tw.WriteStartElement("item"); tw.WriteAttributeString("id", item.ID.ToString("X2")); tw.WriteAttributeString("name", item.Name); tw.WriteAttributeString("stackable", item.Stackable.ToString()); tw.WriteAttributeString("address", item.Address); tw.WriteEndElement(); } tw.WriteEndElement(); tw.WriteEndDocument(); tw.Flush(); tw.Close(); interactionManager.StopBuying("Finished Updating Successfully", CreateAhResourcesXml); settingsManager.loadAHResourcesXML(); }