|
XML Home
XML Tutorial About XML XML Viewers XML Editors XML Documents XML Syntax XML Elements XML Attributes XML with CSS XML with XSL XML Namespace XML Local Namespace XML Default Namespace XML Entities XML Creating Entities XML CDATA DTDDTD IntroductionDTD DOCTYPE DTD Internal DTD External DTD Combined DTD FPI DTD Elements DTD Element Operators DTD Attributes DTD Attribute Default Values DTD Attribute Types DTD General Entities DTD Parameter Entities DTD Embedded Images XSLTXSLT IntroductionXSLT Example XSLT Syntax XSLT <template> XSLT <apply-templates> XSLT <value-of> XSLT <for-each> XSLT <sort> XSLT <if> XSLT <choose> XPathXPath IntroductionXPath Location Path XPath Location Path - Absolute XPath Location Path - Relative XPath Attributes XPath Axis XPath Node Test XPath Predicate XPath Node Set XPath Comparison Operators XPath Boolean Operators XPath Number Operators XPath String Functions Tutorial Summary XHTML Tutorial AJAX Tutorial |
XPath IntroductionXPath is a language that enables you to navigate, and find data, within your XML documents. Using XPath, you can select one or more nodes in order to retrieve the data they contain. Actually, we've already used XPath in this XML tutorial - we used it to program some of our XSL transformations. XPath is used quite extensively with XSLT. Once you start learning XPath, you'll see how suited it is to XSLT. XPath PurposeSince XPath is used for finding data within XML documents, this enables you to write applications that make use of the data within an XML document. In fact, in order to use XSLT (to transform the contents of your XML documents), you need to use XPath. Other XML based languages such as XQuery and XPointer also rely on XPath expressions, so XPath really does play an important role when writing XML applications. Consider the following XML document:
What are some of the things we might be interested in when writing an application? We might need to extract the title of all albums for example. Or, we might only be interested in the artists. Or, we might only be interested in albums and artists from a specific niche, such as rock. XPath allows us to select only the nodes we're interested in. Enjoy this website?
Oh, and thank you for supporting Quackit! |
FREE Hosting!With every domain name you register with ZappyHost, you get FREE (ad supported) hosting.PLUS you get:
Featured Template:
(Build your websites in minutes!) Got a MySpace Page?Get "www.yourname.com" for your MySpace page. Learn how >>. |