Html 移除一个元素';带Hpricot的s类属性
我该怎么做?例如:Html 移除一个元素';带Hpricot的s类属性,html,ruby,hpricot,Html,Ruby,Hpricot,我该怎么做?例如: <span class="selected" id="hi">HELLO</span> 你好 应该成为 <span id="hi">HELLO</span> 你好 span = Hpricot(some_html) % "span#hi" span.remove_attribute("class")
<span class="selected" id="hi">HELLO</span>
你好
应该成为
<span id="hi">HELLO</span>
你好
span = Hpricot(some_html) % "span#hi"
span.remove_attribute("class")