Skip to content

Package.from_dict(obj.to_dict()).to_xml() messes up vocab types #33

Open

Description

@slbayer

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.

Activity

  1. ikiril01 commented on Jun 19, 2014

    @ikiril01
    Member

    Thanks for the bug report. This stems from an issue with the use of the is_plain() method in the VocabString python-cybox class. I've added a tracker entry there to evaluate it: CybOXProject/python-cybox#174

  2. slbayer commented on Jun 24, 2014

    @slbayer
    Author

    Turns out that this issue:

    #36

    is actually another instance of this one, because I didn't realize that what I was looking at in this other issue was the output of to_xml() produced with the pattern noted here. So in addition to BAD_XSI_TYPE, I see cyboxVocabs:ActionObjectAssociationTypeVocab-1.0 instead of maecVocabs:ActionObjectAssociationTypeVocab-1.0. Sorry for the confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions