Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Builder when a property is undefined should not render in the XML #652

Open
Raffaello opened this issue Aug 12, 2022 · 2 comments
Open

Builder when a property is undefined should not render in the XML #652

Raffaello opened this issue Aug 12, 2022 · 2 comments

Comments

@Raffaello
Copy link

having a simple object like (typescript):

{
 keyA: "keyA",
 keyB: undefined
}

the resulting Builder of that object it would be something like

<xml>
 <keyA>keyA</KeyA>
 </keyB>
</xml>

it would be better having an option in the builder that will prune those empty elements, so it can be achieved this result instead

<xml>
 <keyA>keyA</KeyA>
</xml>
@meeting-you
Copy link

you can build object like:

{
    "xml": {
        "keyA": {
            "_": "keyA"
        }
    }
}

keyB can control by js

@Raffaello
Copy link
Author

you can build object like:

{
    "xml": {
        "keyA": {
            "_": "keyA"
        }
    }
}

keyB can control by js

i don't understand what you mean. you posted a JSON.
what i am asking is to prune the empty XML tags in case there are.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants