XPathReader Article on MSDN

This is now been published on the MSDN XML developer center as I mentioned in an earlier post. A very useful component. The main points to remember about its usage are;

  1. It is a streaming XmlReader implementation. That is why the XPath subset is limited. There is no intelligent caching or bookmarking to walk back up the tree of nodes.

  2. It abstracts away details of the XmlReader API by using an XPath expression, hence this is very much a usability driven component.

  3. Combining this with an XmlWriter makes for efficient, streaming XML transformations without having to resort to XSLT in many simpler transformation scenarios.

Comments (1)

  1. But some kind of caching can be implemented. E.g. it’s possible to keep name/attributes of some ancestors to allow something like //foo[@a="b"]/../@bar.

    Beside that – it’s rocking component!

Skip to main content