G
graphicsxp
Hi,
I've converted an HTML page to a valid XML XDocument. Now I want to
search this XDocument using LINQ and I want to find all the nodes that
have an attribute 'class' equals to 'mxb'.
I've done that but it doesn't work :
StringReader reader = new StringReader(xml);
xDoc = XDocument.Load(reader, LoadOptions.None);
var he = from link in xDoc.Elements()
where link.Attribute("class").Value == "mxb"
select link;
Nothing is returned. What is the correct syntax ?
I've converted an HTML page to a valid XML XDocument. Now I want to
search this XDocument using LINQ and I want to find all the nodes that
have an attribute 'class' equals to 'mxb'.
I've done that but it doesn't work :
StringReader reader = new StringReader(xml);
xDoc = XDocument.Load(reader, LoadOptions.None);
var he = from link in xDoc.Elements()
where link.Attribute("class").Value == "mxb"
select link;
Nothing is returned. What is the correct syntax ?