Download 365 Ways to Live Cheap: Your Everyday Guide to Saving Money by Trent Hamm PDF

delimiters Text The character data in the node (note that every text node consists of at least one character) Namespace The namespace URI associated with the corresponding namespace prefix If you're using DOM, note that Table 2-1 establishes a loose correspondence between XPath string-values and the values returned by the DOM nodeValue method. The exceptions — and they're important ones — are that nodeValue, when applied to the document root and element nodes, returns not a concatenated string but a null value.

Person[child/@name='Cindy'] There's no restriction on the number of location steps that might employ predicates, although the simple examples above show predicates only on the last step. In navigating around an XHTML document with XPath, you might use a location path such as this: /html/body/p[@align="center"]/img[@border > 0] 57 This selects each img element with a border attribute greater than 0, as long as the img element's parent is a center-aligned p element that is a child of the body element (which in turn is a child of the html element).

Download PDF sample

Rated 4.76 of 5 – based on 29 votes