Getting the XPath without straining your brain


Yesterday I talked about using System.Xml in the new object model. My code examples included a key part of the InfoPath programming model: looking up fields in the data source using XPath so that you can set and get values.
 
Unfortunately, figuring out the absolute XPath to a field can be a pain.
 
Fortunately, we’ve made that easy in InfoPath 2007.
 
Here’s how
Right click the field in the Data Source task pane and click Copy XPath
 
Now you can paste the XPath into your code and be on your merry way.
 
Hope that helps,
Ned
Comments (5)

  1. BobC says:

    Any chance this type of enhancement will make it in to IP2003

    Also, I’m looking for a good doc on developing in 2007 for IP 2003 clients and forms server.  Anyone have thoughts?

  2. Bob_Chauvin says:

    Based on your comments regarding IP2003/2007 compatability I should be able to use IP2007 to benefit from these types of designer improvments, while maintaining IP2003 client support.

    Thanks.