Leonidas-from-XIV / node-xml2js

XML to JavaScript object converter.
MIT License
4.87k stars 601 forks source link

Question on usage #581

Closed JasonDictos closed 4 years ago

JasonDictos commented 4 years ago

I have the following node object structure:

{
    "Condition": [
        {
            "And": [
                {
                    "Or": [
                        {
                            ...
                        }
                    ]
                },
                {
                    ...
                }
            ]
        }
    ]
}

When I convert it to xml I get:

<Condition>
    <And>
        <Or>
            ...
        <Or/>
    <And/>
    <And>
        ...
    <And/>
<Condition/>

But what I want is:

<Condition>
    <And>
        <Or>
            ...
        <Or/>
        ...
    <And/>
<Condition/>

Is there any built in option that will accomplish this? Or do I have to manipulate the node object stuff manually prior to converting it to xml?

JasonDictos commented 4 years ago

After reading the readme it suggested to not open issues for usage so, closing