我拉從github最近的提交,並嘗試使用紅寶石解析它。我知道我可以手動解析它,但我想看看是否有一些軟件包可以將它變成散列或其他數據結構。這是什麼樣的數據結構?
commits:
- parents:
- id: 202fb79e8686ee127fe49497c979cfc9c9d985d5
author:
name: This guy
login: tguy
email: [email protected]
url: a url
id: e466354edb31f243899051e2119f4ce72bafd5f3
committed_date: "2010-07-19T13:44:43-07:00"
authored_date: "2010-07-19T13:33:26-07:00"
message: |-
message
- parents:
- id: c3c349ec3e9a3990cac4d256c308b18fd35d9606
author:
name: Other Guy
login: oguy
email: [email protected]
url: another url
id: 202fb79e8686ee127fe49497c979cfc9c9d985d5
committed_date: "2010-07-19T13:44:11-07:00"
authored_date: "2010-07-19T13:44:11-07:00"
message: this is another message
引入nokogiri解析XML:http://nokogiri.org/ – 2010-07-19 22:36:25