c# - Can't Get .NET XPathNavigator to work -
i having problems xpathnavigator. have document bunch of "topic" elements w/o namespace in stream. i using (expression dumbed down bare minimum, first thought expressions wrong): xpathdocument xmldoc = new xpathdocument( stream ); xpathnavigator xml = xmldoc.createnavigator(); xpathnodeiterator iter = xml.select( "//topic" ); this doesn't work. can select */*/* or similar , "topic" elements alright. tried running expressions in online tester , other languages , work. question: what's wrong? have lingering suspicion has accursed namespacemanager object, causes me incredible pain every time parse document namespaces, time elements seeking don't have explicit namespace! added: xmlnamespacemanager s = new xmlnamespacemanager( xml.nametable ); and pass 2nd argument select - no avail. how supposed add "" namespace thing/use correctly? or, better yet, there way use xpath in .net without using horrible abomination of class...