Skip to content

Support for List of items and negate the XmlRoot name #5

Description

@DevEstacion

When serializing a list, it currently cannot handle ignoring the root of the list.

Sample would be having a List

After serialization, the output would be something like this.

<MyEntities>
    <MyEntity>
        <Name>test</Name>
        <Addr>test</Addr>
    </MyEntity>
    <MyEntity>
        <Name>test</Name>
        <Addr>test</Addr>
    </MyEntity>
    <MyEntity>
        <Name>test</Name>
        <Addr>test</Addr>
    </MyEntity>
</MyEntities>

But what It should be is

<MyEntity>
    <Name>test</Name>
    <Addr>test</Addr>
</MyEntity>
<MyEntity>
    <Name>test</Name>
    <Addr>test</Addr>
</MyEntity>
<MyEntity>
    <Name>test</Name>
    <Addr>test</Addr>
</MyEntity>

This simulates the XmlElement and XmlArray comparison in the native XmlSerializer

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions