Accessing Data from an XML Data Store

The following example, listing 23.5, accesses movies.xml and looks for the titles of all the movies of the type comedy. Note that the DTD decrees that title must be the first child of movie:

<!ELEMENT movie (title, writer+, producer+,
director+, actor*, poster?, comments?)>

Thus, your coding is much simplified.

Listing 23.5 writes out the titles of all the comedy movies in movies.xml.

Listing 23.5. Extracting Movie Titles of the Comedy Type
 <html> <head> <title>Accessing XML files</title> </head> <body bgcolor="white"> <h3 align ="center"> Opening movies.xml as a dom object</h3> <% dim xmlString 'line10 dim oXMLDOM dim oXMLfile set oXMLDOM=server.CreateObject("Microsoft.XMLDOM") oXMLDOM.load("c:\samsbook\movies.xml") ...

Get XML Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.