代码之家  ›  专栏  ›  技术社区  ›  Ken Bloom

Nokogiri中的安全$variable绑定

  •  2
  • Ken Bloom  · 技术社区  · 14 年前

    假设我想查询xpath //*[@id=$href] $href 变量?

    这类似于Rexml的 XPath.first( node, "//*[@id=$href]", nil, {"href"=>"linktohere"})

    1 回复  |  直到 14 年前
        1
  •  0
  •   Ken Bloom    14 年前

    This feature has just (a half hour ago) been added to Nokogiri, so it should appear in the next version.