Remove descendants ?

Topics: Developer Forum
Jan 24, 2010 at 5:46 PM

I think it's nice to have XPath queries but why the Descendants(string name) has to be removed ? it was a nice override and we were able to do simple queries like that :

 

 var videoNodes = (from node in mainNodes
                              from subnode in node.DescendantNodes()
                              where subnode.Name == "embed"
                              select subnode).FirstOrDefault();

 var myNodes = (from node in doc.DocumentNode.Descendants("div")

                              from subnode in node.DescendantNodes()

                              where subnode.Name == "embed"

                              select subnode).FirstOrDefault();

 

XPath can be complex, can't we give the choice between two API ? In the example of the trunk I see only .NET 2.0 framework code ?

Jan 24, 2010 at 11:58 PM

It has not been removed. Trunk is the previous release, I've been doing all the new development in a branch. I will be merging into trunk when I can get a chance to get everything together and build the final 1.4.0 release. I got a new computer recently and need to get all the sandcastle and docproject stuff set back up.