Skip to content

xml2lua.toXml() : Duplicated XML tags is broken when converting from Lua to XML #87

@chrisaga

Description

@chrisaga

Use case : create a lua table and convert it to XML with duplicated tags

based on xml2lua/example3.lua we could expect :

local tag = { tag1={ 1='A', 2='B' } }
print(xml2lua.toXml(tag, 'tag')

would give :

<tag>
    <tag1>A</tag1>
    <tag1>B</tag1>
</tag>

but it gives insead :

<tag>
    <tag1>
      <tag1>A</tag1>
      <tag1>B</tag1>
    </tag1>
</tag>

The easyest way to test it is to append the following line at the end of xml2lua/example3.lua (select the 3rd test by uncommenting line 18) :

print(xml2lua.toXml(handler.root.tag, 'tag'))

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