Tag Archives: XPath

Performing an XPath query on a Windows Workflow XAML

I was working on parsing the information from a Microsoft .Net 4.0 Workflow XAML and was stuck trying to perform an XPath query to extract out the various “State Machine State” from the XAML.

After spending some time on good old MSDN,  we find the following piece of information.

image

With this in hand, we add a dummy namespace prefix using the XmlNamespaceManager and viola, the query now works~!

image

I hope this helps someone.