The XML DOM in InfoPath
The XML Document Object Model (DOM) models the XML that forms the data source of an InfoPath form template. As the user adds, deletes, or modifies data in a form control, the InfoPath client automatically makes the corresponding modifications to the DOM behind the scenes. When the
elects to save a form, the data contained in the modified in-memory DOM is saved to disk.
The DOM and XPath
The XML DOM has many similarities to the XPath 1.0 data model. Both models represent an XML document as a hierarchy of nodes. In the DOM, an XML document is represented as a
node. In InfoPath, the main node types that you will
time with, other than
MSXML allows you to access nodes in the DOM using XPath expressions.
SAVE YOUR WORK OFTEN
The Microsoft Script Editor is a powerful scripting environment, but it can also be a frustrating tool.
In the release version of InfoPath 2003, the Microsoft Script Editor sometimes (although infrequently)
completely with no obvious cause. You can get into a situation in which the Script Editor won't allow you to edit or exit. The only thing you can do is close down InfoPath, and you'll lose all the unsaved design work on
form templates along with all your scripting code. To avoid frustration, be sure to save design work and script code often. This hasn't
to me often, but it's very annoying to lose your work.
Another quirk of the Script Editor occurs when you have multiple windows open ”for example, several InfoPath
, task panes, the InfoPath Help window, and the Microsoft Script Editor and its Help window.
XP varies in whether it displays the Help window in the taskbar. When you click on the icon on the taskbar you want to open, the Script Editor sometimes takes you to the Script Editor Help window. If this happens, clicking on the Minimize button in the Script Editor Help window will hide it and allow you to edit your script in the main Script Editor window.