XPathNavigator discussions 

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:

  • Get DataSet
  • DataSet -> XmlDataDocument (constructor, which takes DataSet, public XmlDataDocument(DataSet))
  • XmlDataDocument -> XPathNavigator (XmlDataDocument.CreateNavigator)

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.

Categories:  XML
Monday, July 28, 2003 9:33:44 AM (Central Europe Standard Time, UTC+01:00)  #    Comments

 

All comments require the approval of the site owner before being displayed.
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Live Comment Preview
Copyright © 2003-2024 , Matevž Gačnik
Recent Posts
RD / MVP
Feeds
RSS: Atom:
Archives
Categories
Blogroll
Legal

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-2024
Matevž Gačnik

Send mail to the author(s) E-mail