Working with XPath: The .NET Way
(Page 1 of 5 )
In this article we will focus on fundamentals of XPath and how to work with XPath, together with the .NET framework.
What is XPath?
Lot of readers have already asked me about working with XPath and XQuery using the .NET framework. To answer you all, I will start with a simple XPath article. In this article, I will introduce you to the concept of “XPath” together with .NET, which is one of the several XML technologies existing today. Prior to reading this, you need to have a sound understanding of XML.
Coming to “XPath,” it is a language for finding information in an XML document. XPath is used to navigate through elements and attributes in an XML document in a very easy and effective manner. It is not something like “find and replace” in notepad or other word processing applications. “XPath” has its own rules, structure, syntax and several other strict issues to work with. But if we really focus and understand “XPath” from scratch, all of those strict issues become very easy.
First of all, is “XPath” necessary or compulsory? To answer a question with another question, is SQL compulsory? Can’t we develop applications without SQL at all? I think you can already guess my answer. To be frank, “XPath” is not compulsory. You can still achieve everything (working with an XML document) without working with “XPath” at all. But, one should consider some of the common issues in application development, such as ease, effectiveness, speed, productivity, simplicity, and so on. All of those are available with “XPath” when working with XML documents
Another important issue to consider is “XPath” is a “NON-XML language.” This is one of the most critical confusions among many application developers. It is just a language for querying XML documents, not XML itself. Because XPath is an abstract language, it can be used in many environments. It’s heavily used throughout XSL Transformations (XSLT) to identify nodes in the input document (XML document). It’s also used in most Document Object Model (DOM) implementations for richer querying capabilities.
Next: What is inside XPath? >>
More .NET Articles
More By Jagadish Chaterjee