PRB: Element Is Not Updated When You Add Data to an XML Data Island (303866)
The information in this article applies to:
- Microsoft Internet Explorer (Programming) 5
- Microsoft Internet Explorer (Programming) 5.01
- Microsoft Internet Explorer (Programming) 5.01 SP1
- Microsoft Internet Explorer (Programming) 5.5
This article was previously published under Q303866 SYMPTOMS
When you bind an element to XML data and dynamically add more data to the data island through script, the Data Source Object (DSO) is not updated. As a result, the element cannot display the newly added data.
This problem is not specific to the XML data island; it applies to other data sources as well.
CAUSE
This problem occurs because the DSO determines the schema of the data when the data binding agent first invokes it. Even if you add more data to the source later, the DSO cannot change the schema. Therefore, the element that is binding to the DSO fails to display the updated data.
RESOLUTION
To resolve this problem, follow these steps:
- Call loadXML on the XML DSO with the updated data island to reload the XML DSO.
- Add an empty element statically to allow Internet Explorer to construct the schema.
- Remove the element programmatically when it loads. After you do so, the schema builder sees the element, and you can dynamically add attributes and text to the element later without any problem.
REFERENCES
For more information, see the following Microsoft Web sites:
Modification Type: | Major | Last Reviewed: | 5/12/2003 |
---|
Keywords: | kbprb KB303866 |
---|
|