Setting Application Data
The operations that set application data take an argument named data of type string[]. Each element of this sequence of strings must consist of a location path and the value to set, separated by an equal sign ('='). The value consists of all characters right of the equal sign, including any leading or trailing white space. The operation fails if one of the elements of data does not contain an equal sign separating the location path and the value, or if the location path does not adhere to the syntax for location paths specified below (§Syntax of Location Paths). If the operation fails at this point, no application data has been modified.
Once data has been successfully validated, the operation evaluates each location path. If the location path references an XML element, all children of the element are removed, and if the new value is not an empty string, replaced by a single Text node containing the value. If the location path references an XML attribute, the value of this attribute is set to the new value.
If the location path does not reference an existing node, evaluation of the location path creates new nodes as required so evaluation of the location path always produces at least one node. Therefore, once the elements of data have been successfully validated, the operations setting application data should not fail. Thus, the operations setting application data are atomic, setting either all referenced nodes to their new values, or none.