Leonidas-from-XIV / node-xml2js

XML to JavaScript object converter.
MIT License
4.9k stars 606 forks source link

When converting XML to JSON, there needs to be an order。 #709

Open 469113827 opened 2 months ago

469113827 commented 2 months ago

my xml:

<simplesect kind="par"><para>result - hello <computeroutput><ref refid="" kindref="compound">ProtocolNotifyInfo</ref></computeroutput> bye </para>
</simplesect>

I want to know the sequential relationship between hello, ProtocolNotifyInfo, and bye,but get:


 {
        "_": "result - hello  bye ",
        "computeroutput": [
            {
                "ref": [
                    {
                        "_": "ProtocolNotifyInfo",
                        "$": {
                            "refid": "",
                            "kindref": "compound"
                        }
                    }
                ]
            }
        ]
    }
```,

  I don't know where to put ProtocolNotifyInfo。 thinks