spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / javascript / column104


Web Services, Part IX: Pattern-Based XML Node Selection

Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs

Context Definition - Part B

The fourth node of mydvd7.xml is where the data tree hangs. The name of the top-level child is sales (xmlDoc.childNodes[3].nodeName), from the sales tag:

<sales>
  .
  .
  .
</sales>

The sales node has two child nodes:

The summary node has five child nodes:

The summary's child nodes do not have any lower-level child nodes. The data node is the root of a much deeper tree, as it holds the actual data of the dvds. The data node has three child nodes, one for every month of the report:

Each month has five child nodes: one for its name and four for its four week proceeds. Here are the child nodes of January:

Similarly, here are the child nodes of February:

March's three child nodes are:

The name nodes have child nodes of their own, one per node. They hold the name's text property:


Next: How to select nodes

http://www.internet.com

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint


Produced by Yehuda Shiran and Tomer Shiran
All Rights Reserved. Legal Notices.
Created: February 25, 2002
Revised: February 25, 2002

URL: http://www.webreference.com/js/column104/3.html