Your SlideShare is downloading. ×
XPath
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

XPath

917
views

Published on

XPath

XPath

Published in: Technology

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
917
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
40
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. P P L
  • 2. D:Web TechnologiesXml
  • 3. / predicate node test axis/child::Contacts/child::Contact[@id=3]/child::phone
  • 4. • child axis • following-sibling axis• attribute axis • namespace axis• ancestor axis • parent axis• ancestor-or-self axis • preceding axis• descendant axis • preceding-sibling axis• descedant-or-self axis • self axis• following axis
  • 5. ancestor-or-self ancestor preceding following parentpreceding-sibling following-sibling self child descendant descendant-or-seft
  • 6. • //Contact[@id=3]• //Contact[@title=“Mr”][@age>25]
  • 7. • Boolean boolean(arg) //returns false if object equal to zero/NaN/empty• Boolean false() //returns the Boolean value false• Boolean lang(string arg) //to check language which is used in context node• Boolean not(arg) //• Boolean true() // returns the Boolean value true
  • 8. • number count(node-set arg) //returns the number of nodes• node-set id(string arg) //returns a node-set• last() // returns a value equal to the context size• string local-name(optional node-set arg) //returns local name(context node)• string name(optional node-set arg) //returns the nam of node in QName format• string namespace-uri(optional node-set arg) //returns namespace-uri of node-set• Number position() //returns value equal to the context position
  • 9. • number ceiling( number arg) //returns the smallest integer greater than this• number floor(number arg) //returns the largest integer that is lower than this• number number(arg) //to convert string, Boolean, node-set to number //returns NaN if can not convert• number round(number arg) //returns the integer that is closest to the number arg• number sum(node-set arg) // return sum of node in node-set // return NaN if node can’t converted to number
  • 10. • string concat(string arg1, arg2) //returns the concatenation of those strings• Boolean contains(string arg1, arg2) //returns true if arg1 contains arg2• string normalize-space(string arg1) //=trim & replace whitespace=single space• Boolean start-with(string arg1, arg2) //returns true if arg1 starts with arg2• string string(arg) //to convert Boolean, node-set, number to string• number string-length(string arg) //returns the length of the string arg• string substring(string arg1, number arg2, optional number arg3) //return substring of arg1• string substring-before(string arg1, arg2) //• string substring-after(string arg1, arg2) //• string translate(string arg1, arg2, arg 3) //
  • 11.  Functions and location paths are orthogonal
  • 12. • /child::Contacts/child::Contact[@id=3]/child::phone• /Contacts/Contact[@id=3]/phone
  • 13. http://www.w3.org/TR/xpath20/http://www.w3.org/TR/xpath-functions/http://www.w3.org/TR/xpath-datamodel/

×