- Contents
Interaction Designer Help
XML Create Document
This XML tool creates a document from a prepackaged string resource stored in the handler file. The properties dialog of the tool allows editing the XML data. Files can be imported into the editor. The XML data can be checked for content and formatted in the editor.
Note: Even if data is imported from a file, the data is always stored locally in the handler. Thus, no reference is maintained to the file.
XML Data
This field displays the XML data being used to create the document.
Settings
Preserve Whitespace
Checking this box preserves white spaces when loading the document. This flag specifies the default white space handling when the xml:space attribute is set to "default." When the parameter is true, all whitespace is preserved, regardless of the xml:space settings in the document. When false, the values of the xml:space attribute specified in the document determine whether white space is preserved or not.
By default, this box is not checked.
Validate On Parse
Checking this box forces the validation of the document during parsing. By default, this box is not checked.
Resolve Externals
Checking this box causes the parser to resolve resolvable externals such as namespaces, DTD external subsets, and external entity references. By default, this box is not checked.
Cache Document
When this box is checked, the document is cached, allowing for very efficient re-use. This option is most useful for frequently used documents that do not have to be changed programmatically, most notably XSLT style-sheets. Enabling caching of style-sheets is particularly efficient, as pre-compiled templates of the style-sheets are kept in the cache.
Cached documents may be evicted from the cache if they are not used for more than about 10 minutes. However, this is completely transparent, as a new instance will be created and cached the next time a the document is created.
If the box is not checked, a new instance of the document will be parsed from the string resource in the handler every time a handler invokes the tool.
This box is checked by default.
Read Only
When this box is checked, the XML Document tree cannot be modified. An error occurs when attempts are made to modify a read-only XML document. This box is checked by default.
XML Document
The node of the document. The value is NULL if an error other than parse error occurred.
XML Document Element
The root element of the document. The value is NULL if the document has no root element or if a (parse) error occurred.
Selection Namespaces
This list associates a prefix with the corresponding namespace URI for XPath selection operations. See description for SelectionNamespaces property in XML Set Document Property tool for more details. The four buttons on the bottom of the field allow you to manage this list.
Add
Clicking this buttons opens a dialog box that allows you to add a new item to the list. Once the dialog box is open:
-
Select a namespace URI from the dropdown list or enter a namespace URI. The dropdown list shows a list of all namespaces used by the data currently in the edit box. However, you are not required to use these namespace URIs, this is just for convenience.
-
Enter the prefix to be associated with the namespace URI. The dropdown list shows the prefix of the first namespace declaration using the given namespace URI. Again, this is just for your convenience, as one usually likes to use the same prefixes in the selection patterns as the appear in the document. However, you may specify any prefix you like.
Note: Prefix names must be unique, but you may declare an arbitrary number of prefix mappings for the same namespace URI.
Edit
This button allows you to edit an existing entry on the list.
Remove
This button deletes the selected item from the list.
Clear
Clicking this button deletes all entries from the list.
Exit Paths
Success
This path is taken if the document is successfully parsed.
Parse Error
This path is taken if an error occurs parsing the data. Use the XML Get Error Info tool with the Document node as the argument to retrieve rich information about the error.
Failure
This path is taken if the operation fails for any reason other than a parsing error.