• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Q&A

Q1:Is it possible to move backward through the nodes in a nodelist?
A1: Yes, it is. The loop used to step through the nodes could be rewritten in this form:
// We now start at the top and go down to zero.
for(loopindex=nodecount-1;loopindex>=0;loopindex--)
   {

/*  This line will write the name of the node to the body section of the
     HTML file */
    document.write(RootElement1.childNodes.item(loopindex).nodeName+ ": ");
/* This line will write out the data contents of the node to the body
    section of the HTML file. */
    document.write(RootElement1.childNodes.item(loopindex).text+ "<BR>");
   }

Because the data is in the form of an array, we can access the data in any order we want.

Q2:How many different data types can be defined in XML?
A2: Because the number of possible tag names is effectively infinite, there's no upper limit.
Q3:Why is it possible to define your own tags in XML but not in HTML?
A3: In HTML, the tags tell the browser what it is to do with the text between them. In XML, the interpretation of the tag names is not the responsibility of the browser.
Q4:Can ActiveX controls be used in any browser?
A4: No, they generally work only in IE. However, the latest version of Netscape, version 6.0, provides a great deal of support for ActiveX controls.
Q5:What is the difference between a node and a nodelist?
A5: In XML, a node refers to all items that are a separate element. A nodelist is a specific type of node, one that is a list of nodes.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint