To recreate, do this: import maec obj = maec.parse_xml_instance("maec_4.1_examples/package_manual_analysis_example.xml")["api"] print maec.package.package.Package.from_dict(obj.to_dict()).to_xml().encode('utf8') (the final encode() is because I'm printing to an ASCII terminal; it isn't going to affect the problem). In the output, search for BAD_XSI_TYPE, which occurs all over the place.