Community articleUFLXMLModelUpdate function
Added by IBM contributorIBM on August 16, 2011
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

No abstract provided.


This function updates the XML data model in the form. This is necessary if computes have changed the structure of the data model in some way, such as changing or adding bindings. These sorts of changes do not take effect until the UFLXMLModelUpdate function is called.


   r_short UFLXMLModelUpdate(
      formNodeP aNode


Table 1. Function parameters
aNodeformNodePAny node in the form.


OK on success or an error code on failure.


The following example uses UFLSetLiteralByRefEx to change a binding in the form, so that it binds to a different option. It then calls UFLXMLModelUpdate so that the data model reflects the change.
The sample code uses setLiteralByRefEx to change the binding in the form, then calls xmlModelUpdate so that the XML data model reflects the change.
   r_error setBinding(theForm)
      if (UFLSetLiteralByRefEx(theForm, NULL,
         " [bindings] [0] [boundoption]", 0, NULL, NULL,
         "PAGE1.FIELD5.value") == NOTOK)
         fprintf(stderr, "Could not set literal value in binding.");
      if (UFLXMLModelUpdate(theForm) == NOTOK)
         fprintf(stderr, "Could not update XML model.");

Parent topic:
FormNodeP functions