|theObject ||formNodeP||The formNodeP object.|
|theModelID||r_charP||The ID of the model to update. If NULL or empty, the default model is updated.|
|theNodeRef||r_charP||An XPath reference to a node in the instance that you want to update. An empty string indicates the document node of the default instance of the selected model.|
|theNSNode||formNodeP||This node defines the namespaces for the function. Use NULL if the node that this function is operating on has inherited the necessary namespaces.|
|theFilename||r_charP||The file to read the instance data from. This file must be UTF-8. Note that if both a file and a memory block are provided, the file will take precedence.|
|theMemoryBlock||r_byte||The memory block that contains the instance data. Use NULL if you are reading from a file, input stream, or Reader.|
|theMemoryBlockSize ||r_long||The size of theMemoryBlock.|
|updateType||r_u_long||One of the following constants:
XFORMS_UPDATE_REPLACE — Replaces the node that is referenced by theNodeRef with the input instance data.
XFORMS_UPDATE_REPLACE_TEXT — Replaces the string value of the node that is referenced by theNodeRef with the input data.
XFORMS_UPDATE_APPEND — Adds the input data as the last child node of the node that is referenced by theNodeRef.
XFORMS_UPDATE_INSERT_ BEFORE — Adds the input data as a sibling before the node that is referenced by theNodeRef. You cannot insert data before the root element of the instance.
XFORMS_UPDATE_DELETE — Deletes the node that is referenced by theNodeRef. You cannot delete the entire instance.
If used, the following flags must be used in conjunction with one of the updateType flags described above:
XFORMS_DEFER MODEL_UPDATE — Marks the model for a deferred update. In a deferred update, the data model is not changed immediately; instead, the model is flagged to indicate that there are changes that need to be implemented. To enact a deferred update and implement the changes to the model, use the UFLXFormsModelUpdate function.
XFORMS_SUPPRESS_MODEL_UPDATE — Prevents any automatic updating of the model. See the "Notes" section below for usage details.
Note: You can only use the XFORMS_DEFER MODEL_UPDATE and XFORMS_SUPPRESS_MODEL_UPDATE flags when XForms processing is turned on.
<xforms:instance id="instance1" xmlns="">
r_error updateDataInstance(formNodeP theForm)
if (UFLUpdateXFormsInstance(theForm, "model1",
"c:\\InstanceData.xml", NULL, 0, XFORMS_UPDATE_REPLACE)
fprintf(stderr, "Could not replace data instance.");