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.


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


I hope this helps someone.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s