【发布时间】:2012-10-28 03:09:53
【问题描述】:
我需要解析一个 XML 样式表:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/templates/xslt/inspections/disclaimer_en.xsl"?>
我尝试使用 Nokogiri:
doc.search("?xml-stylesheet").first['href']
但我得到了错误:
`on_error': unexpected '?' after '' (Nokogiri::CSS::SyntaxError)
【问题讨论】: