SlideShare a Scribd company logo
1 of 2
Comparison
CSS XPath
All elements * //*
All input elements input //input
All child input elements input>a //input/*
Element by ID input#foo //input[@id=‘foo’]
Element by class input.foo //input[@class=‘foo’]
Element w/ attribute input[value=‘foo’] //input[@value=‘food’]
3rd cell in table table#users tr.names
td:nth(3)
//table[@id=‘users’]//tr[@cl
ass=‘names]//td[3]
Pros & Cons
XPath CSS
faster X
more readable X
search for text X
backup through DOM X
widely used by developers X
cross-browser compatible X

More Related Content

Viewers also liked

2 المقدمة والفصل الأول
2 المقدمة والفصل الأول2 المقدمة والفصل الأول
2 المقدمة والفصل الأولAmr Gad
 
Presentation keselamatan kerja kel 10
Presentation keselamatan kerja kel 10Presentation keselamatan kerja kel 10
Presentation keselamatan kerja kel 10Yuda Wardiana
 
EVOLUCIÓN DE LA WEB
EVOLUCIÓN DE LA WEBEVOLUCIÓN DE LA WEB
EVOLUCIÓN DE LA WEBDeycyJ
 
Λεξικό χρωμάτων
Λεξικό χρωμάτωνΛεξικό χρωμάτων
Λεξικό χρωμάτωνNatasaSkorda
 
Ancillary dps
Ancillary dpsAncillary dps
Ancillary dpsellasav
 
Sarderi masin
Sarderi masinSarderi masin
Sarderi masinanushtad
 
final final accepted-High temperature stability and photocatalytic activity of
final final accepted-High temperature stability and photocatalytic activity offinal final accepted-High temperature stability and photocatalytic activity of
final final accepted-High temperature stability and photocatalytic activity ofnasrollah najibi ilkhchy
 

Viewers also liked (14)

Esguicho regulável
Esguicho regulávelEsguicho regulável
Esguicho regulável
 
2 المقدمة والفصل الأول
2 المقدمة والفصل الأول2 المقدمة والفصل الأول
2 المقدمة والفصل الأول
 
Record news
Record newsRecord news
Record news
 
MMAM_i7_Cover
MMAM_i7_CoverMMAM_i7_Cover
MMAM_i7_Cover
 
Presentation keselamatan kerja kel 10
Presentation keselamatan kerja kel 10Presentation keselamatan kerja kel 10
Presentation keselamatan kerja kel 10
 
EVOLUCIÓN DE LA WEB
EVOLUCIÓN DE LA WEBEVOLUCIÓN DE LA WEB
EVOLUCIÓN DE LA WEB
 
Tumbler
TumblerTumbler
Tumbler
 
Λεξικό χρωμάτων
Λεξικό χρωμάτωνΛεξικό χρωμάτων
Λεξικό χρωμάτων
 
Ancillary dps
Ancillary dpsAncillary dps
Ancillary dps
 
Sarderi masin
Sarderi masinSarderi masin
Sarderi masin
 
HRM - MCB
HRM - MCBHRM - MCB
HRM - MCB
 
Sobre corazon
Sobre corazonSobre corazon
Sobre corazon
 
PGS 2016
PGS 2016PGS 2016
PGS 2016
 
final final accepted-High temperature stability and photocatalytic activity of
final final accepted-High temperature stability and photocatalytic activity offinal final accepted-High temperature stability and photocatalytic activity of
final final accepted-High temperature stability and photocatalytic activity of
 

lightening talk

  • 1. Comparison CSS XPath All elements * //* All input elements input //input All child input elements input>a //input/* Element by ID input#foo //input[@id=‘foo’] Element by class input.foo //input[@class=‘foo’] Element w/ attribute input[value=‘foo’] //input[@value=‘food’] 3rd cell in table table#users tr.names td:nth(3) //table[@id=‘users’]//tr[@cl ass=‘names]//td[3]
  • 2. Pros & Cons XPath CSS faster X more readable X search for text X backup through DOM X widely used by developers X cross-browser compatible X