Skip to content

DrawIO parser incorrect stereotype parsing #94

@Semprini

Description

@Semprini
def class_parse(package: UMLPackage, element, root) -> Optional[UMLClass]:
    stereotypes = []
    label = get_label_name(element)
    if label is None:
        logger.warn(f"Could not find valid name of class in XML node 'label'. Node has keys of {element.keys()} and values of {element.values()}")
        return None
    label_split = label.split(">>")
    if len(label_split) > 1:
        name = label_split[-1]
        for stereotype in label_split[0].strip('<<').split(','):
            stereotypes.append(stereotype.strip())
    else:
        name = label

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions