SlideShare a Scribd company logo
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

Esguicho regulável
Esguicho regulávelEsguicho regulável
Esguicho regulável
Ideal Extintores
 
2 المقدمة والفصل الأول
2 المقدمة والفصل الأول2 المقدمة والفصل الأول
2 المقدمة والفصل الأولAmr Gad
 
Record news
Record newsRecord news
Record news
Meio & Mensagem
 
Presentation keselamatan kerja kel 10
Presentation keselamatan kerja kel 10Presentation keselamatan kerja kel 10
Presentation keselamatan kerja kel 10
Yuda Wardiana
 
EVOLUCIÓN DE LA WEB
EVOLUCIÓN DE LA WEBEVOLUCIÓN DE LA WEB
EVOLUCIÓN DE LA WEB
DeycyJ
 
Tumbler
TumblerTumbler
Tumbler
naiarasalgado
 
Λεξικό χρωμάτων
Λεξικό χρωμάτωνΛεξικό χρωμάτων
Λεξικό χρωμάτων
NatasaSkorda
 
Ancillary dps
Ancillary dpsAncillary dps
Ancillary dps
ellasav
 
Sarderi masin
Sarderi masinSarderi masin
Sarderi masin
anushtad
 
HRM - MCB
HRM - MCBHRM - MCB
HRM - MCB
Areeba Gill
 
Sobre corazon
Sobre corazonSobre corazon
Sobre corazon
Fundación FLEC
 
PGS 2016
PGS 2016PGS 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
nasrollah 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