As my officemate Mike put it, “This is why I don’t try to lift 157 kilos out of a snatch.”
Category: Etc
Everything that doesn’t fit anywhere else
Read this later…
Hillel sent me this to read. Read it later.
XPathExpression.SetContext
After more digging, I found out that it is supported that you have to use the XPathExpression object to do it. You have to compile your XPath expression first using the XPathNavigator, and then you call SetContext on the XPathExpression, passing in your XmlNamespaceManager. Also, something that bit both Mike and I: the prefixes you put in the namespace manager have nothing to do with the prefixes that were originally in the serialized xml. You can make them whatever you want. That way, if you use namespaces without using prefixes, you can still assign a prefix inside the XmlNamespaceManager so that your XPath queries will work. This is devious, devious work.
No namespace support in XPathNavigator?
Mike and I were just mucking around trying to make some XPath work with the XPathNavigator. Turns out, we can’t figure out how to make a namespace-aware XPath query with the XPathNavigator. Neither of us see how you would associate a prefix with a namespace to make the query. On an XmlDocument, this is easy using an XmlNamespaceManager, which you pass into Select, but on the XPathNavigator, there’s just no love. I want some love!
Are we on crack? Is there some way to make a namespace-aware query with the XPathNavigator?
Beanie babies, eBay, and Cheating
What a great way to get back at your cheating ex-spouse. You can just feel the rage through the large text and bad color choices.