var doc = htmldocument.DocumentNode.SelectNodes("//div[starts-with(@class, 'sense-block')]"); foreach (var div in doc) { Assets.Dictionary Dic = new Assets.Dictionary(); string vob = div.SelectSingleNode(".//span[@class='hw']").ToString(); string word = div.SelectSingleNode(".//span[@class='pos']").InnerText.Trim(); string pra = div.SelectSingleNode(".//span[@class='guideword']").InnerText.Trim(); if(vob==null && worb==null && pra==null) { Dic.Example = div.SelectSingleNode(".//span[@class='def-block']").InnerText.Trim(); Dic.Explaining = div.SelectSingleNode(".//span[@class='def']").InnerText.Trim(); Lst.Add(Dic); } }
string vob = div.SelectSingleNode(".//span[@class='hw']").ToString();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)