1345Chapter 52 .Application: Outline-Style Table of Contents Figure (Web site construction)
1345Chapter 52 .Application: Outline-Style Table of Contents Figure 52-2: OPML-based outliner style If you want to associate more information about an entry, simply add an attribute. For example, if an entry is to behave as a link, you can convey that information with an attribute whose name you determine. When it comes time for your scripts to render the content in HTML, the scripts access the attribute values and generate the associated HTML for the attributes (you see an example of this in the code). The true beauty of the OPML structure (and XML in general) is that the parent child relationships are automatically implied by the element containment. Unlike the JavaScript custom object in the first example, the author does not have to specify how many levels deep an entry is, or whether it has any child nodes: The XML containment hierarchy describes all of that information. Suddenly, all of the W3C DOM gobbledygook about nodes, child nodes, and attributes become your friend, as your scripts convert the element hierarchy into a renderable hierarchy of your design.
If you are in need for cheap and reliable webhost to host your website, we recommend http web server services.