added nice serialization with DTD support;