forge

SharePoint and XPath

I blogged earlier about using the XmlNamespaceManager to get back nodes from SharePoint XML fragments.  I found a better way (with the help of some BizTalk MVPs that I got to hang out with recently).  Instead of doing /wp:Fields/wp:Field or whatever nonsense that you need to do to get the XmlNamespaceManager to work use the local-name() function so … /*[local-name() = ‘Fields’]/*[local-name()=’Field’]

Help Your SharePoint User

I’m sure someone will tell me why that isn’t very performant … but I don’t care it works, it’s clear to read, and I don’t have to go through hoops to get the XmlNamespaceManager hooked up.