NaturalIntelligence / fast-xml-parser

Validate XML, Parse XML and Build XML rapidly without C/C++ based libraries and no callback.
https://naturalintelligence.github.io/fast-xml-parser/
MIT License
2.54k stars 306 forks source link

attribute value with "true" string is not able to buid again with XMLBuilder #664

Closed stylejuya closed 3 months ago

stylejuya commented 3 months ago

Description

in the attribute if there is a value with "true" string, It is not able to build back.

Input

<married firstTime="Yes" test="true">Yes</married>

Code

Include the code being used for parsing

Output

<married firstTime="Yes" test>Yes</married>

expected data

<married firstTime="Yes" test="true">Yes</married>

Would you like to work on this issue?

Bookmark this repository for further updates. Visit SoloThought to know about recent features.

github-actions[bot] commented 3 months ago

We're glad you find this project helpful. We'll try to address this issue ASAP. You can vist https://solothought.com to know recent features. Don't forget to star this repo.

amitguptagwl commented 3 months ago

Have you checked the documentation?

stylejuya commented 3 months ago

Could you highlight the doc? I did not see any related to this .

amitguptagwl commented 3 months ago

There are many properties that can help you in different ways. Please read about all the properties. It's not a long document.

https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/docs/v4/3.XMLBuilder.md

stylejuya commented 3 months ago

What kind of answer is this? When the value is β€œtrue” it does not build back and when the value is β€œfalse” it build back. This behavior is already the library does not work seamlessly. I know you don’t get paid for the open source . However, I have never seen this level of kind response. Thank you and Have a good day

2024λ…„ 7μ›” 13일 (ν† ) 04:47, Amit K Gupta @.***>λ‹˜μ΄ μž‘μ„±:

There are many properties that can help you in different ways. Please read about all the properties. It's not a long document.

β€” Reply to this email directly, view it on GitHub https://github.com/NaturalIntelligence/fast-xml-parser/issues/664#issuecomment-2226731186, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACLZBW3FQFHHI4FE2DMPCDZMCIMHAVCNFSM6AAAAABKW46GN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRWG4ZTCMJYGY . You are receiving this because you authored the thread.Message ID: @.***>

amitguptagwl commented 3 months ago

If you check the history, most of the questions I receive because people don't read documentation. Anyways, what properties have you tried yet? Have you tried suppressBooleanAttributes?