Open Crazyokd opened 1 month ago
with below code:
local people = { command_code="Authentication-Information-Request", applicationId="3GPP S6a/S6d", ["Hop-by-Hop"] = "0x5dd1330b", avp = { ["Session-Id"] = { _attr = {type = "string", vendor = "0"}, }, } } print("XML Representation\n") print(xml2lua.toXml(people, "root"))
I can get below result:
XML Representation <root> <Hop-by-Hop>0x5dd1330b</Hop-by-Hop> <command_code>Authentication-Information-Request</command_code> <applicationId>3GPP S6a/S6d</applicationId> <avp> <Session-Id>dfslk</Session-Id> <Session-Id> <vendor>0</vendor> <type>string</type> </Session-Id> </avp> </root>
But I want synthesize <Session-Id type="string" vendor="0">846</Session-Id> i tried various method, but all can't work.
<Session-Id type="string" vendor="0">846</Session-Id>
with below code:
I can get below result:
But I want synthesize
<Session-Id type="string" vendor="0">846</Session-Id>
i tried various method, but all can't work.