internal static Dictionary <ushort, ParseXML> _uLt6b1uwFNgoZycBDqE02WmgdfB(XDocument doc) { Dictionary <ushort, ParseXML> _Y47d6cq6yur6qR7gPJQSTOJl5Wm = new Dictionary <ushort, ParseXML>(); (from elem in doc.Element("Objects").Elements("Object") where elem.ContainsElement("Item") select elem)._rvkyhEufCiuaZq8jbaYgthJoLEx(delegate(XElement item) { ParseXML parseXml = new ParseXML(item); _Y47d6cq6yur6qR7gPJQSTOJl5Wm[parseXml._ItemId] = parseXml; }); return(_Y47d6cq6yur6qR7gPJQSTOJl5Wm); }
static void Main(string[] args) { Console.WriteLine("Starting XML Parser"); Console.WriteLine("Opening the input file"); StreamReader lStreamReader = new StreamReader("InputFile.xml"); Console.WriteLine("Parsing XML File"); InputDocument lInputDocument = ParseXML.Parse <InputDocument>(lStreamReader); PrintResult(lInputDocument); Console.WriteLine("XML Parser execution has finished"); Console.ReadLine(); }
public static void _uLt6b1uwFNgoZycBDqE02WmgdfB() { WebClient webClient = new WebClient(); try { Program.LogInfoMessage("core", "Downloading OBJECTS..."); string objectData = Resources.Objects; Program.LogInfoMessage("core", "Downloading PACKETS..."); string packetData = webClient.DownloadString("https://realmstock.network/Public/PacketsExalt"); Program.LogInfoMessage("core", "Downloading TILES..."); string tileData = Resources.GroundTypes; Program.LogInfoMessage("core", "Loading XML..."); XDocument parsedObjects = XDocument.Parse(objectData); XDocument parsedPackets = XDocument.Parse(packetData); XDocument parsedTiles = XDocument.Parse(tileData); Program.LogInfoMessage("core", "Parsing Objects..."); _VPArsrlUa0uEsW6OxAYV9WHJAMK = new _VHWgt8pn9AXryODuVtLv9GmmHeH <ushort, ObjectStructure>( ObjectStructure.GetObjectDictionary(parsedObjects)); Program.LogInfoMessage("core", "Parsing Items..."); _3ndzvDGHhvqls1BD8vzizSQBDdI = new _VHWgt8pn9AXryODuVtLv9GmmHeH <ushort, ParseXML>( ParseXML._uLt6b1uwFNgoZycBDqE02WmgdfB(parsedObjects)); Program.LogInfoMessage("core", "Parsing Packets..."); _PP85pw5fC3jVm7LDMzFra717hdB = new _VHWgt8pn9AXryODuVtLv9GmmHeH <byte, PacketStructure>( PacketStructure._uLt6b1uwFNgoZycBDqE02WmgdfB(parsedPackets)); Program.LogInfoMessage("core", "Parsing Tiles..."); GetTile = new _VHWgt8pn9AXryODuVtLv9GmmHeH <ushort, TileStructure>( TileStructure._uLt6b1uwFNgoZycBDqE02WmgdfB(parsedTiles)); return; } finally { ((IDisposable)webClient).Dispose(); } }
static void Main(string[] args) { var value = ConfigurationManager.AppSettings["filePath"]; Program program = new Program(); ValidateContract validation = new ValidateContract(); ParseXML parseXML = new ParseXML(); var contracts = parseXML.ParseContracts(value); foreach (XElement xelement in contracts) { Contract result = parseXML.ParseContract(xelement); if (validation.ValidiateContract(result)) { program.InsertToDB(result); } } }
protected void btnLogin_Click(object sender, ImageClickEventArgs e) { //读XML配置文件 string configFile = "C:\\config.xml"; LoginInfo login = ParseXML.getLoginInfo(configFile); string userName = txtUsername.Value; //PageValidate.InputText(txtUsername.Value.Trim(), 30); string Password = txtPass.Value; // PageValidate.InputText(txtPass.Value.Trim(), 30); if ((userName == login.User) && (Password == login.Password)) { Response.Redirect("ViewData.aspx"); } else { string strInfo; strInfo = string.Format("{0} , {1}", login.User, login.Password); txtUsername.Value = strInfo; } }
public List <AppPermissions> Get() { return(ParseXML.getAllAppsPermissions()); }
public string GetCustomerId(AppsService CustIdService) { var Token = CustIdService.Groups.QueryClientLoginToken(); var uri = new Uri("https://apps-apis.google.com/a/feeds/customer/2.0/customerId"); WebRequest WebRequest = WebRequest.Create(uri); WebRequest.Method = "GET"; WebRequest.ContentType = "application/atom+xml; charset=UTF-8"; WebRequest.Headers.Add("Authorization: GoogleLogin auth=" + Token); WebResponse WebResponse = WebRequest.GetResponse(); if (WebResponse == null) { throw new Exception("WebResponse is null"); } StreamReader SR = new StreamReader(WebResponse.GetResponseStream()); var _Result = SR.ReadToEnd().Trim(); var Xml = new ParseXML(_Result); foreach (var x in Xml.ListFormat) { if (x.Name == "customerId") { CustomerId = x.Value; } } return CustomerId; }
static void Main(string[] args) { ParseXML parseXML = new ParseXML(); parseXML.parseXML(); }