阅读背景:

如何使用Nokogiri从HTML中删除不需要的标签?

来源:互联网 

I need to strip out all font tags from a document. When attempting to do so with the following Ruby code, other elements and text within the font tags are lost. I've also attempted to iterate through all children elements and make them siblings of the font tag before unlinking the font tag--which also results in lost HTML. What is a good method for removing tags which can contain other elements and/or text?I need to strip out all font tags from a docume




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: