paulgray/exml — pull request #11 by ostinelli (2012-10-21 00:58:11+00:00)
Title: add attribute parsing for #xmlstreamstart

Currently, `exml_query:attr/2,3` and `exml_query:path/2,3` return an error if the element is a `#xmlstreamstart`.

This pull request allows to get elements on a stream, for instance:

```erlang

1> rr(exml).
[xmlcdata,xmlelement,xmlstreamend,xmlstreamstart]
2> El = #xmlstreamstart{name = <<"stream:stream">>, attrs = [{<<"who">>, <<"me">>}]}.
#xmlstreamstart{name = <<"stream:stream">>,
attrs = [{<<"who">>,<<"me">>}]}
3> exml_query:attr(El, <<"who">>).
<<"me">>
```