public void parseNode(InfoNode _caller, HtmlNode _node) { string _str; if (_node.HasAttributes) { foreach (HtmlAttribute attr in _node.Attributes) { switch (attr.Value) { case "user": parseUserNode(_caller, _node); break; case "": _caller.Online = (bool)true; _caller.Name = cleanNodeInnerText(_node); break; case "c_66": _caller.Online = (bool)false; _caller.Name = cleanNodeInnerText(_node); break; case "c_99": _str = cleanNodeInnerText(_node); _caller.XP = Convert.ToInt64(_str); break; case "c_66 ml21": _caller.Title = cleanNodeInnerText(_node); break; default: break; } } } }
private void parseUserNode(InfoNode _caller, HtmlNode _localNode) { ; HtmlNodeCollection coll; ; saveNodeToFile(node); coll = _localNode.SelectNodes(_localNode.XPath + @"/a/span[@class]"); //user online foreach (HtmlNode localSubNode in coll) { parseNode(_caller, localSubNode); } }