Joshua Prismon's Technical weblog

.NET News Now

Interesting things...

Let me get one thing off my chest real quick. MS-SQL's XPATH support bites... It doesn't just bite, it sucks hardcore. Ok, general background:I recently inherited a troubled project and a local firm (on a contracting basis). Without going into any (NDA-non complient) details, I am looking at how to replace proprietary identifier and search functions with XPATH functions:
  • Microsoft's XPATH doesn't support recursion. (A problem given how most people implement heirarchies in SQL)
  • To use XMLDocument and Datasets, you have to have the full tree in memory.
  • XPathNavigator seems to be a iterative call model, there is no way to restrict the nodes in the tree before hand.
    For example, if I had a query //Customers[@name="bob"] the XpathNavigator still iterates in a manner that requires a tree in memory that represents the full structure. I also have been playing Aspected Oriented Programming as of late, and am sorry to say that I agree with a growing consensus of people out there who point out that state and concurrency concerns make AOP very difficult. I am still working on a project that I called ManagedSockets. Managed Sockets use Attributes (or XML config information) to build a temporary state machine for socket communication to pass via. AOP is effective when a outside engine can manage the state of diverse objects. If something other then your engine is controlling the executable path of each object, problems abound. (This includes other aspects as noted Here) Anyways, Contracting business is doing well for me, just wish I had more time.
  • Comments

    TrackBack said:

    Kirk Allen Evans' Blog
    # June 18, 2003 1:13 PM

    kpako@yahoo.com (Dare Obasanjo) said:

    Hello Joshua,
    Thanks for the feedback. I am a PM at Microsoft who works on a number of XML technologies in System.Xml.

    The XmlDocument is based on the W3C XML DOM recommendation which is primarily designed for processing entire documents stored in memory. The XPathNavigator is simply a cursor and does not require a particular loading model for the XML data source which the navigator cursors over. All 3 objects that represent XML data stores provided in the .NET Framework (XmlDocument, XmlDataDocument and XPathDocument) load the entire document in memory so the XPathNavigator provided over them cursors over all the XML in memory.
    # June 18, 2003 4:57 PM

    Kirk Allen Evans said:

    I would agree only partially with your assessment of SQLXML XPath support in that it is missing features. However, these capabilities are more than well-documented in SQL Server books online, and they make sense once examined in the context of a relational database. Maybe Yukon will clear more of this up as XQuery finds closer integration.

    As for the rest of .NET, this is just a lack of familiarity with the models. As Dare points out, the DOM pulls all of the data into memory in conformance with the W3C DOM model. If you need a lazy-load or partial-load, you will need to mix models. See my web log post on this.

    http://weblogs.asp.net/kaevans/posts/8927.aspx
    # June 18, 2003 11:49 PM
    Leave a Comment

    (required) 

    (required) 

    (optional)

    (required)