given an xpath say
can you do something like
doc.xpath("/html/body/a").wrap("<span></span>")
and wrap all the links with span tags ?
given an xpath say
can you do something like
doc.xpath("/html/body/a").wrap("<span></span>")
and wrap all the links with span tags ?
doc.xpath("/html/body/a").each{ |a| a.swap("<span>#{a}</span>") }
found better solution
doc.search("a").wrap('<span></span>')