R4R
Right Place For Right Person TM
 
R4R XPath

R4R
provide basic XPATH Tutorials concept with XPATH Examples . Through R4R you can develop XPATH programming concept. R4R provide XPATH Interview Questions with answers.R4R provide XPATH Languages study materials in easy way.

XPATH Interview Questions with Answers

1.1    XPATH Subjective Questions with Answers
1.2    XPATH Interview Questions with Answers
1.3    XPATH Objective Questions And Answers
1.3    FAQS

Introduction of XPath:

XPath is the solution to finding information in an XML document. XPath uses expressions to find elements, attributes, and other information in your XML.

XML documents have a tree structure
-XPath allows you to concisely describe sets of XML elements and attributes in this tree.
-Analogy to file system paths.
- A file system hierarchy is a tree of directories and files.
- A filesystem path describes how to reach a specific file, starting either from the root, or the current working directory.
-XPath exploits this intuitive notion of a path, and extends it to XML documents.

Nodes of XPath:

 In the XML tree available for XPath expressions, there are 7 node types:

  1. The root node (one per document)
  2. Element nodes
  3. Attribute nodes
  4. Text nodes
  5. Comment nodes
  6. Processing instruction nodes
  7. Namespace nodes

Simple Example :

 

<?xml version="1.0" encoding="ISO-8859-1"?>

<bookstore>

<book>
  <title lang="eng">Harry Potter</title>
  <price>29.99</price>
</book>

<book>
  <title lang="eng">Learning XML</title>
  <price>39.95</price>
</book>

</bookstore>

Some Expression How to Locate path:

Expression Description
/ Selects from the root node
//  Selects nodes in the document from the current node that match the selection no matter where they are
.  Selects the current node
.. Selects the parent of the current node
@  Selects attributes

 

Path Expression Result
/bookstore Selects the root element bookstore
bookstore/book Selects all book elements that are children of bookstore
//book Selects all book elements no matter where they are in the document
bookstore//book Selects all book elements that are descendant of the bookstore element, no matter where they are under the bookstore element
//@lang Selects all attributes that are named lang
   
   

Advantage of XPath:

1.Flexible expression: The user may use whatever tags/attributes seem intuitive when designing the schema
2.latent semantics: Many users prefer to figure out the semantics when/if necessary
3.Application Specific Constraint Checking

4.Core Technology: XSLT/XPath is a "core technology" which is well supported, well understood, and with lots of material written on it.
5.Expressive Power: XSLT/XPath is a very powerful language. Most, if not every, constraint that you might ever need to express can be expressed using 6.XSLT/XPath. Thus you don't have to learn multiple schema languages to express your additional constraints
7.Long Term Support: XSLT/XPath is well supported, and will be around for a long time.

Disadvantage of XParh:

1.Separate Documents: With this approach you will write your XML Schema document, then you will write a separate XSLT/XPath document to express additional constraints. Keeping the two documents in synch needs to be carefully managed

2.Efficiency is access limited

.
 


Tolal:0 Click:
Show All Comments

Post Your Comments

Your Name:

Your Email ID :
Comments :
URL
  =* Enter SUM

New Updates

10:New Updates
Tutorials,examples and Interview Questions with answers
Posted By: Shashi     Posted Date:02.10.14

9:C# Tutorials,C# examples and C# Interview Questions with answers
R4R provide C# Tutorials,C# examples and C# Interview Questions with answers. Through R4R you can develop a small application and small programs.We cover C# Tutorials,C# examples and C# Interview Questions and answers for freshers as well experienced programmer.
Posted By: Shashi     Posted Date:11.17.13

8:Java/J2EE(Servlet,JSP,JNDI,Struts,Spring,Hibernate,EJB,JSF,JMS,Web-Services)
In this section R4R covers Java/J2EE(Servlet,JSP, JNDI, Struts, Spring, Hibernate, EJB,JSF,JMS,Web-Services) Tutorials with Examples.R4R provide Java/J2EE (Servlet,JSP, JNDI,Struts, Spring, Hibernate, EJB, JSF, JMS, Web-Services) Interview Questions with answers study materials for freshers and experienced.
Posted By: Shashi     Posted Date:11.13.13

7:CoreJava Tutorials , CoreJava Examples and CoreJava Interview Questions with answers
In this section R4R covers CoreJava Tutorials with CoreJava Examples. R4R covers CoreJava programming concept in easy way. R4R provide CoreJava Interview Questions with answers study materials for freshers and experienced.
Posted By: Shashi     Posted Date:11.04.13

6:Microsoft.net Technology ASP.NET,c# ,ADO.NET,WCF,WPF,Silverlight ,VB.net
R4R provides Microsoft Technologies(like ASP.NET,c# ,ADO.NET,WCF,WPF, Silverlight and VB.ne)Tutorials with Examples,programming concept and Interview Questions with answers study materials for freshers and experienced.
Posted By: Shashi     Posted Date:11.04.13

5:J2me Tutorials concept with Examples with Netbean IDE and J2ME Application Examples.
R4R cover basic J2me Tutorials concept with Examples and provide a way to develop J2me programming concept in easy way. R4R provide J2me Interview Questions with answers.R4R provide J2me Languages study materials with examples uing Netbean IDE and J2ME Application Examples.
Posted By: Shashi     Posted Date:10.30.13

4:J2me Tutorials concept with Examples ith netbean IDE and J2ME Application Examples.
R4R cover basic J2me Tutorials concept with Examples and provide a way to develop J2me programming concept in easy way. R4R provide J2me Interview Questions with answers.R4R provide J2me Languages study materials with examples uing Netbean IDE and J2ME Application Examples.
Posted By: Shashi     Posted Date:10.30.13

3:Java ebooks , Java tutorials , Java examples , Java interview questions and answers
R4R provides study materials for Java/j2EE technologies. R4R covers core java, advanced java, servlet, JSP, Struts, Spring, Hibernate, EJB, JSF, J2ME, ANT, JUnit and Some APIS .R4R also provides ebooks,tutorials,examples, interview questions and answers.
Posted By: Shashi     Posted Date:10.30.13

2:Learn basic C++ Tutorials with Examples , C++ Interview Questions with answers
R4R is a free E-learning website.You can learn basic C++ Tutorials with Examples , C++ Interview Questions with answers and also some hot topics.
Posted By: Shashi     Posted Date:10.30.13

1:C Tutorials with Example C subjective and objective interview questions and answers
R4R provide C Tutorials with Example and also provides C subjective and objective interview questions and answers.You can learn C in easy way.We cover basics of C here and give some examples.
Posted By: Shashi     Posted Date:10.30.13

R4R
R4R
R4R
R4R
R4R
R4R
R4R
R4R