XML, Namespace, selectSingleNode

BrerOxill

New Member
I have an XML string:<BR><?xml version="1.0"?><BR><RULE xmlns="x-schema:RuleSchema.xml"><BR>..whatever...<BR>..whatever...<BR>..whatever...<BR></RULE><BR><BR>I am trying to load the XML and extract certain nodes in a User Control:<BR>Dim objXML As XmlDocument = New XmlDocument()<BR>xmlSR = New System.Io.StringReader(objDS.Tables(0).Rows(0)("XMLRule"))<BR>objXML.Load(xmlSR)<BR><BR>Dim objNode As XmlNode<BR>Dim objRoot as XmlElement = objXML.DocumentElement<BR><BR>objNode = objRoot.selectSingleNode("//START_DATE")<BR>response.write(objNode.innerText)<BR><BR>I does not work when the xmlns is specified in the root node, but it works if I take it out. How do I make it work without taking the xmlns out?
 
Back
Top