Do I have to load an XmlNode into a Document to use SelectNodes?

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Im querying a SharePoint web service, which returns an XmlNode. I then want to use an XPath query to select out a collection of nodes to an XmlNodeList, etc.
Running SelectNodes on the returned Node returns a null value. Every solution example I can find online creates an XmlDocument and loads in the Node.OuterXml.
Why? Doesnt this serialize the XML to a string, then reparse it into XML? This seems horrifically inefficient. Is there truly no way to run an XPath query on a returned SOAP XML Node to select out descendant nodes? <hr class="sig Philo Janus, MCP Author: Pro InfoPath 2007 Pro PerformancePoint 2007 Pro SQL Server Analysis Services 2008 Building Integrated Business Intelligence Solutions with SQL Server 2008 R2 & Office 2010 Blog @ http://philo.typepad.com/with-all-due-respect/

View the full article
 
Back
Top