Clojure语言:Sequence(二)

2014-11-24 11:01:08 · 作者: · 浏览: 2
["200"]}]}]
}
{:tag :mongodb, :attrs nil, :content [{:tag :uri, :attrs nil, :content ["localhost"]}]}
{:tag :uri, :attrs nil, :content ["localhost"]}
"localhost"
{:tag :socket, :attrs nil, :content [{:tag :port_number, :attrs nil, :content ["7777"]}
{:tag :login_timeout, :attrs nil, :content ["200"]}
{:tag :check_timeout, :attrs nil, :content ["200"]}]}
{:tag :port_number, :attrs nil, :content ["7777"]}
"7777"
{:tag :login_timeout, :attrs nil, :content ["200"]}
"200"
{:tag :check_timeout, :attrs nil, :content ["200"]}
"200"
)
可以看到xml-seq返回的结果第一部分就是parse返回的结果,之后就是每个xml元素单独一个list, 分别是mongodb, mongodb.uri, socket, socket.port_number, socket.login_timeout和socket.check_timeout.