extracting only elements with text (or value)
- by guy
hay all.
i am trying to transform html to xml
meaning extracting all elements with text
using this code is not working maybe some one has the answer ?
System.Xml.Linq.XElement query1 = new System.Xml.Linq.XElement("RawHTMLData",
from q in hDoc.Descendants("TABLE")
where q.HasElements
select new System.Xml.Linq.XElement("TABLE" + (++i).ToString(),
from j in q.Elements("TR")
where j.HasElements && j.Descendants("div") != null
select new System.Xml.Linq.XElement("Row",
from hh in j.Descendants("div")
where tt => j.Descendants("div").Contains(hh.Value)
select(TT(hh)))));