What ever happened to XPathReader
Asked Answered
T

4

21

XPathReader is/ was an implementation of a forward reading XML parser (built on XMLReader) which allowed you to register XPath queries for it to find (or at least a subset of XPath called Sequential XPath). This seems to be the perfect choice for easy access to elements of xml streams, or case where you just need to pull some information out of the start of a large xml document and therefore don't want to load the whole thing into memory.

There seemed to be a flurry of excitement about the open source implementation that one of the MS guys was releasing back in 2003/ 2004, eg:

http://donxml.com/allthingstechie/archive/2004/02/26/430.aspx

http://msdn.microsoft.com/en-us/library/ms950778.aspx

http://www.tkachenko.com/blog/archives/000472.html

But after that the trail seems to dry up. The references to where the implementation was hosted (http://workspaces.gotdotnet.com/xpathreader) no longer seem to work. Does anyone know what happened to it, and why the interested disappeared?

Thorr answered 21/1, 2009 at 13:11 Comment(1)
I thought LINQ-to-XML built a DOM tree to evaluate the XPaths. Does it work with a stream?Apsis
I
6

XNode.ReadFrom combines the power (and supported status) of Linq to XML with the ability to process a stream rather than loading the entire file into memory

http://msdn.microsoft.com/en-us/library/system.xml.linq.xnode.readfrom.aspx

Insufflate answered 9/11, 2012 at 17:45 Comment(0)
A
4

I suspect that LINQ-to-XML happened. However, the Mvp.Xml project on CodePlex has many features that relate to this. You might want to take a look at the XPointer.NET library they have developed and the XPointerReader.

Also, you might want to take a look at this FastXPathReader on CodeProject (I don't know how effective it is).

As for XPathReader, all I could find were the links you provided and links associated with those. It looks like it disappeared. Like I said, I think LINQ-to-XML was the outcome, but I'm just guessing.

Anesthesiology answered 21/1, 2009 at 16:10 Comment(4)
Thanks for your reply. Jeff. From what I know of LINQ-to-XML it doesn't really solve the same problem, does it? Unfortunately, even if it does, we can't use LINQ yet as we're still stuck with .Net 2. The CodeProject project is too incomplete to be useful. [cont...]Thorr
[...cont] I might have to look at whether I can recast my current needs in terms of XPointer and use the Mvp stuff.Thorr
I'm not sure that LINQ-to-XML entirely solves the problem - but I wouldn't be surprised if XPathReader was pushed aside because of it. I'm still looking around for something similar. I'll let you know.Anesthesiology
I use my own wrapper around XmlReader, much like XPathReader but supporting a smaller subset of paths, namely just "element paths" (element names separated by '/'). Then I parse fragments into documents and enjoy all the normal random-access benefits, one subset of the document at a time. The result is a convenient programming model, decent speed, flat footprint, and the ability to handle arbitrarily large files.Scuba
S
4

It seems that ms released this over here and the install includes source code.

Saxony answered 27/10, 2009 at 16:14 Comment(2)
"Date Published: 5/6/2004" - it's not been maintainedThorr
I was able to get it to compile and run the test suite in VS2010 using the .NET 4 framework. It still works, even if it's not being maintained.Apsis
I
0

Found myself asking the very same question today as I was meaning to build a BizTalk pipeline component to parse incoming message for specific elements.

After some googling, I found out that the XPathReader assembly is shipped with BizTalk and is residing in the GAC.

Just reference the GAC assembly Microsoft.BizTalk.XPathReader.dll and you're up and running!

Inseparable answered 27/4, 2018 at 7:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.