C# Programming
05-29-2009, 04:40 AM
Hi,
I experienced something really weird today. First, some context: Im trying to retreive list of files from .csproj file (visual studio project). I found that file list is at this path: Project/ItemGroup/Compile. So I loaded the file into xml document and queried nodes by SelectNodes method. Nothing special. But... When I call something like this:
doc.SelectNodes("/Project/ItemGroup/Compile")
then no nodes are returned. Call like this:
doc.SelectNodes("/*[name()='Project']/*[name()='ItemGroup']/*[name()='Compile']")
works and returns expected result!
And nothing special in xml, looks like this:
http://www.barakasoft.com/script/Forums/Images/smiley_confused.gif
Does anybody have an idea whats happening?
IComplexApplication app = Programer.Implement(); // Programing is simple!
I experienced something really weird today. First, some context: Im trying to retreive list of files from .csproj file (visual studio project). I found that file list is at this path: Project/ItemGroup/Compile. So I loaded the file into xml document and queried nodes by SelectNodes method. Nothing special. But... When I call something like this:
doc.SelectNodes("/Project/ItemGroup/Compile")
then no nodes are returned. Call like this:
doc.SelectNodes("/*[name()='Project']/*[name()='ItemGroup']/*[name()='Compile']")
works and returns expected result!
And nothing special in xml, looks like this:
http://www.barakasoft.com/script/Forums/Images/smiley_confused.gif
Does anybody have an idea whats happening?
IComplexApplication app = Programer.Implement(); // Programing is simple!