Attribute parse

Hi @jjallaire, actually I have a patched version in my computer for a while. Hope I didn't waste your time to investigate the issue. Please feel free to modify as needed.

Resolve #192