I would like to enable XPath navigation over my POCOs (i.e. “plain old CLR objects”). From a brief search, I have found several options:
- Use ObjectXPathNavigator .NET 1.0 implementation. However, since it was written against .NET 1.0, I have concerns about potential issues with generics (and whatever else that wasn’t supported back then).
- Implementing my own XPathNavigator by extending the .NET XPathNavigator class.
The second option appears to be what I want. However, I don’t have the time to write my own — especially since I expect that someone else has already implemented it and made it open source. I just have a difficult time finding this elusive PocoXPathNavigator implementation!
Thanks.
The best approach, it seems, is to use ObjectXPathNavigator (option 1) since it’s open source. I plan to extend it to support generics and whatever else I need.