2011-02-01から1ヶ月間の記事一覧
実際に使ってみたら色々と残念な動作をしたので直した def xml2hash(doc) result = nil doc.children.each do |child| if child.text? return {doc.name.to_sym => doc.content} elsif child.cdata? return {doc.name.to_sym => doc.child.content} elsif ch…
実際に使ってみたら色々と残念な動作をしたので直した def xml2hash(doc) result = nil doc.children.each do |child| if child.text? return {doc.name.to_sym => doc.content} elsif child.cdata? return {doc.name.to_sym => doc.child.content} elsif ch…