SelectSingleNode not finding XML nodes; trying to setProperty("SelectionNamespaces", ...)
I am trying to use SelectSingleNode() to find any node other than the root for this XML: <?xml version="1.0?> <myRootNode xmlns:xsl="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="my:set:of:coloned:stuff"> <level1Node1> <level2Node1> <level3Node1>L3N1Value</level3Node1> </level2Node1> <level2Node2> <level3Node1>L3N1Value</level3Node1> </level2Node2> </level1Node1> <level1Node2> <level2Node1> <level3Node1>L3N1Value</level3Node1> </level2Node1> </level1Node2> </myRootNode> After properly loading the doc and assigning root=doc.documentElement, I am trying L3N1 = root.SelectSingleNode("/level1Node1") L3N1 returns None. The only way anything non-None returns is with "/*" or "//*" -- which return the root. Maybe it's because the start has "xmlns" stuff in it. So now I'm trying to set a namespace using the value that I find in root.namespaceURI doc.setProperty('SelectionNamespaces', 'xmlns="my:set:of:coloned:stuff"') but that doesn't work either. What is the correct incantation for this?Solved2KViews0likes3Comments