Skip to content

it don't work if xml string contain 'type' attribute #12

Description

@longshaoye180

here is the code:
local xml = require("xmlSimple").newParser() local xmlbody = [[<body><message type='chat' read_type='1' from='gambo' to='gambo' ></message></body>]] local xmlTab = xml:ParseXmlText(xmlbody) print(xmlTab.body.message['@type']) print(xmlTab.body.message['@from']) print(xmlTab.body.message['@to']) print(xmlTab.body.message['@read_type'])
the result is:
table: 0xa462f0
gambo
gambo
nil

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions