Basic support for parsing elements.

This includes support for elements with namespaces and attributes. Nested
elements are not yet supported.