xpath cheat for infopath
I found this great cheat if you keep getting errors in infopath and you think for sure it's your xpath expression barfing on you at the last minute.
There's this cute control called the expression control. Add it to your form - you can delete it later. Adding this control brings up a teensy dialog letting you select parts of your data sources (just like the taskview) and bringing them up as an expression. By default it's in dummy mode, where the expression is just a repeat of the name of the node you selected. But! After doing this, take the dialog out of dummy node by clicking the "xpath" box. Bravo, it changes into an always-valid xpath expression.
The only trick is if you're using the code in script, you have to preface that string with //. Don't ask me why.
Tip provided via this newsgroup.
And my resulting eureka moment, with lots of help from practically everyone here at MS (shouldn't be so hard).