Presentation is loading. Please wait.

Presentation is loading. Please wait.

Session II Chapter 3 – Chapter 3 – XPath Patterns & Expressions Chapter 4 – XPath Functions Chapter 15 – XPath 2.0http://www.profburnett.com.

Similar presentations


Presentation on theme: "Session II Chapter 3 – Chapter 3 – XPath Patterns & Expressions Chapter 4 – XPath Functions Chapter 15 – XPath 2.0http://www.profburnett.com."— Presentation transcript:

1 Session II Chapter 3 – Chapter 3 – XPath Patterns & Expressions Chapter 4 – XPath Functions Chapter 15 – XPath 2.0http://www.profburnett.com

2 Outline Introduction XPath 1.0 Nodes Syntax Nodes Relationship / Axes Operators XPath Functions XPath 2.0 8/1/2014Copyright © Carl M. Burnett2

3 Introduction XPath is a syntax for defining parts of an XML document XPath uses path expressions to navigate in XML documents XPath contains a library of standard functions XPath is a major element in XSLT XPath is a W3C recommendation 8/1/2014Copyright © Carl M. Burnett3

4 Introduction XPath Path Expressions Select nodes or node-sets XPath Standard Functions Over 100 built-in functions 8/1/2014Copyright © Carl M. Burnett4

5 Chapter 3 - XPath Nodes Seven Kinds of Nodes: Element Attribute Text Namespace Processing-instruction Comment Document 8/1/2014Copyright © Carl M. Burnett5

6 XPath Node Relationship / Axes Node Relationships / Axes: Node Relationships / Axes Parent Children Siblings Ancestors Descendants 8/1/2014Copyright © Carl M. Burnett6

7 XPath Operators 8/1/2014Copyright © Carl M. Burnett7

8 XPath Syntax Path ExpressionDescription nodenameSelects all nodes with the name "nodename" /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 ExpressionDescription 8/1/2014Copyright © Carl M. Burnett8

9 Chapter 4 - XPath Functions Accessor Error and Trace Numeric String AnyURI Boolean Duration/Date/Time QName Node Sequence Context 8/1/2014Copyright © Carl M. Burnett9

10 Chapter 15 - XPath 2.0 XQuery/XPath Data Model (XDM) Supports XML Schemas XPath Sequences Comma Separated ordered lists of items. Defined by a node or atomic value. Can have duplicates Flat Structure Can Take Predicates - Filters [ ] Can be used in Loops 8/1/2014Copyright © Carl M. Burnett10

11 XPath 2.0 Processes Average Values Min – Max Formatting Strings Testing Conditions Quantifying a Condition Removing Duplicate Items Looping Over Sequences Using Date and Time Writing Comments Processing Non-XML Input 8/1/2014Copyright © Carl M. Burnett11

12 Review Introduction XPath 1.0 Nodes Syntax Nodes Relationship / Axes Operators XPath Functions XPath 2.0 8/1/2014Copyright © Carl M. Burnett12 Next - Chapters 12 & 13 XML Namespaces


Download ppt "Session II Chapter 3 – Chapter 3 – XPath Patterns & Expressions Chapter 4 – XPath Functions Chapter 15 – XPath 2.0http://www.profburnett.com."

Similar presentations


Ads by Google