If you use ShowModalDialog, you can pass in XDocument as a parameter and have full access to the DOM from the HTML in the dialog. If you do not want to have a fully trusted form, you will need to have a task pane and call your modal dialog from there. The modal dialog from within InfoPath is security level 3.

Signature
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com
Hi
I have a an InfoPath form with some controls and a button, I would like to click the button and open a dialog box, or another InfoPath from as a dialog box (and connected to the same data source / schema) then do some work and go back to the main form.
Is that possible? And are there samples on the internet?
Thank you