Implemented initial writing support (elements + attributes).
Replaced public instance methods with a simple static method interface.