ok i got this to work (thanx to xzid) here is the code for those interested
(C# HtmlAgilityPack)
get the column containing the ip info and pass as HtmlNode. returns ip as string
public static string DecodeIp(HtmlNode html)
{
string ip = ""; // Will hold our decoded ip
List<string> DisplayInlineNames = new List<string>(); // Contains our good class names
List<string> Bits = new List<string>(); // Contains all the bits of the IP
///////////////////////////////////////////////////////////////
// Save the names of the {display:inline}'s into an list
///////////////////////////////////////////////////////////////
string[] ClassNameList = html.InnerText.Split('}');
foreach (string str in ClassNameList)
if (str.Contains("inline")) DisplayInlineNames.Add(str.Substring(0, str.IndexOf("{")).Replace('}', ' ').Remove(0, 1));
///////////////////////////////////////////////////////// /////
// Store all nodes from column in HtmlNodeCollection
HtmlNodeCollection IPInfo = html.SelectNodes("span/node()");
// Loop through nodes and grab good ip bits
foreach (HtmlNode node in IPInfo)
{
string classname = "." + node.GetAttributeValue("class", string.Empty); //classname of the node
string style = node.GetAttributeValue("style", string.Empty); //style att of the node
// If the style atrabute contains "display:inline" add to bits
if (style.Contains("display: inline")) Bits.Add(node.InnerText);
// If the first char in class name is numeric add to bits
foreach (char c in classname.Replace(".", ""))
{
if (Char.IsNumber(c)) Bits.Add(node.InnerText);
break;
}
// If the class name is "good" add to bits
for (int i = 0; i < DisplayInlineNames.Count; i++)
if (classname.Contains(DisplayInlineNames[i])) Bits.Add(node.InnerText);
// If lone text add to bits
if (!node.OuterHtml.Contains("<")) Bits.Add(node.InnerText);
}
//
// Time to sort all our bits into an ip
//
foreach (string p in Bits) ip += p + ".";
ip = ip.Remove(ip.Length - 1, 1); //remove trailing '.'
// Repace multiple periods with a single one '...' becomes '.'
Regex regex = new Regex(@"[.]{2,}", RegexOptions.None);
ip = regex.Replace(ip, @".");
return ip; //return decoded ip
}