XPath is a W3C recommendation used to search and find parts of an XML document through a path expression. The elements or attributes that match the path expression will be returned for further processing by the invoking command, module, actor, or component.
In this post, I will explain about the basic concept of XPath via presentation slides. The presentation starts with a revisit to some of the XML key concepts. Subsequently, it shows sufficient elaboration of the basic concept of XPath. It concisely describes the key features of XPath that are worth knowing and practically useful especially when searching inside XML files.
The final part of the presentation consists of a sample project accompanied with some screenshots provided for readers to experiment with. In an upcoming post, I will show how the sample project can be converted into a Maven project for more convenient use and distribution.
You can download the slides from the following URL:
Xpath Basics (1159 downloads)
These days in the web 2.0 era, we are using XML extensively. We use xml on our browser, to represent the hypertext. We use xml in our most recent MS Word documents. We use XML in web services. We use XML in our AJAX applications. To the bigger scale, the enterprise, we also use XML in the service oriented architecture implementation.We fall onto XML as our first choice for universal data format. And also databases?
As a plain text data representation, XML should incur extra overhead for the size and processing time. Indexing XML documents is also another issue, not to mention providing relational data on top of XML documents. Building pure XML database is non-trivial, hence we hardly find implementation for such. However, given all the disadvantages of utilizing XML as the database, is it still possible to do basic database functionality for XML documents?
Fortunately, the answer is yes.
I provide a paper containing my survey to existing approaches to querying XML documents and achieving database functionality over XML documents. Although the structure of the paper may be inclined to academic domain, i think it will still be useful for developer who is looking for quick hindsight for such matter.
You can download the paper from the link below: