try
var nodes = sourceDocument.DocumentNode.SelectNodes("//span[@id]");
List<string> ids = new List<string>(nodes.Count);
if(nodes != null)
{
foreach(var node in nodes)
{
if(node.Id != null)
ids.Add(node.Id);
}
}
return ids;
Pat
2010-03-17 13:35:52