Skip to content

Documentation unclear on relationship between #[xml(tag)] and #[xml(child)] #29

@Hawk777

Description

@Hawk777

For every struct representing an XML element, as far as I can tell, you have to write #[xml(tag = "elementname")] in front of that struct. For a field in a struct that holds a list of child elements of a certain type, as far as I can tell, you have to write #[xml(child = "elementname")] in front of the field. This appears to be double entry: the element name is specified on both the struct definition of the child element, and also on the field within the parent element. As far as I can tell, the documentation doesn’t explain under what circumstances, if any at all, these names may differ, and what it means if they do.

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