922 Part III . Document Objects Reference Syntax (My space web page)

922 Part III . Document Objects Reference Syntax Accessing XML element object properties or methods: (IE5+) [window.]document.all.elementID.property | method([parameters]) About this object The XML element object is the primary container of an XML data island within an HTML page. If your scripts intend to traverse the node hierarchy within the element, or simply access properties of nested elements, then you should assign an identifier to the IDattribute of the XML element. For example, if the XML data contains results from a database query for music recordings that match some user- entered criteria, each returned record might be denoted as a RECORDING element as follows: …elements with details… …elements with details… …elements with details… Your script can now obtain an array of references to RECORDING elements as follows: var recs = document.getElementById( results ).getElementsByTagName( RECORDING ) While it is also true that there is no known HTML element with the tag name RECORDING (which enables you to use document.getElementsByTagName ( RECORDING )), the unpredictability of XML data element names is reason enough to limit the scope of the getElementsByTagName() method to the XML data island. Interestingly, the W3C DOM Level 2 does not define an XML element object within the HTML section. You cannot simply embed an XML document inside an HTML document: The standards clearly indicate that a document can be one or the other, but not both. While the NN6 DOM can recognize custom elements, the browser understandably gets confused when custom elements have tag names that already belong to the HTML DTD. Therefore, I do not recommend attempting to embed custom elements into an HTML document for NN6 unless it some day implements a mechanism similar to IE s XML data islands. Note IE5/Macintosh does not support XML data islands.
In case you need affordable webhost to host your website, our recommendation is ecommerce web host services.

Leave a Reply