I just had another lenghty discussion with another developer trying to convey the benefits of XPathNavigator usage.
It seems to me, that Infoset-based access to SQL Server data can only be done using this:
One can also create an XmlNode instead of XPathNavigator, but I prefer the XPath data model.
This seems a much more scalable solution than using "FOR XML RAW/AUTO/EXPLICIT" and populating an XmlReader with SqlCommand.ExecuteXmlReader. "FOR XML RAW/AUTO/EXPLICIT" is slow and requires an XML serialization/deserialization pair.
It's bad/wrong/sloppy, when people do that between app tiers.
Remember Me
The opinions expressed herein are my own personal opinions and do not represent my company's view in any way.
My views often change.
This blog is just a collection of bytes.
Copyright © 2003-2024Matevž Gačnik
E-mail