This should be of interest to readers in this JavaScript forum. We've posted the article
XPath Support in Browsers by Nicholas Zakas, an excerpt from his book
Professional JavaScript for Web Developers. He's also the author of the very popular
Professional Ajax.
Here's the beginning of the article:
XPath Support in Browsers
Quote:
quote:
Because XML is used for so many kinds of data, it became necessary to create a means to locate data inside of XML code. The answer to this problem is XPath, which is a small language used specifically to locate a single node or multiple nodes that match a particular pattern.
Introduction to XPath
Every XPath expression has two parts: a context node and a node pattern. The context node provides the context from which the node pattern should begin. The node pattern is a string made up of one or more node selectors.
For instance, consider the following XML document:
<?xml version="1.0"?>
<employees>
<employee title="Software Engineer">
<name>Nicholas C. Zakas</name>
</employee>
<employee title="Salesperson">
<name>Jim Smith</name>
</employee>
</employees>
|
... and you can
read the rest of the article here.
Jim Minatel
Senior Acquisitions Editor
Wiley Technology Publishing
WROX Press
Blog:
http://wroxblog.typepad.com/
Jim's Book of the week:
No book this week - Donate to the Red Cross!
__________________
Jim Minatel
Associate Publisher, WROX - A Wiley Brand
Did someone here help you? Click

on their post!