答えは「いいえ」のようです。ライブラリが現在書かれているわけではなく、おそらく全くないかもしれません。ノードのシリアル化のためのコール・パスをトレース:
Nokogiri::XML::Node#to_s
通話to_xml
Nokogiri::XML::Node#to_xml
呼び出しserialize
(いくつかのデフォルトのオプションを設定します)
Nokogiri::XML::Node#serialize
通話write_to
Nokogiri::XML::Node#write_to
通話native_write_to
Nokogiri::XML::Node#native_write_to
呼び出しnative_write_to
、これはthのように見えますです:
&bsp;
def native_write_to(io, encoding, indent_string, options)
set_xml_indent_tree_output 1
set_xml_tree_indent_string indent_string
savectx = LibXML.xmlSaveToIO(IoCallbacks.writer(io), nil, nil, encoding, options)
LibXML.xmlSaveTree(savectx, cstruct)
LibXML.xmlSaveClose(savectx)
io
end
だから、あなたは、この時点でのlibxmlのなすがままにされています。 libxml serialize single quote attributesのためのグーグルはすぐに喫煙銃を上げません。
あなたはfile a feature requestと思って、どのような種類のテンダーロビンが得られるかを見てください。 :)
元の中にあったクォート様式をそのまま残しておいてください "_ Nokogiriは属性の引用スタイルを保持できますか?"(http://stackoverflow.com/q/8424858/405017) – Phrogz