-
Notifications
You must be signed in to change notification settings - Fork 243
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
writing with indent is not work #372
Comments
@ImJeremyHe You can use But if that's acceptable it does work https://docs.rs/quick-xml/0.22.0/quick_xml/struct.Reader.html#method.trim_text |
@dralley Thank you for your reply. I just realized that what leads to this problem is my setting |
Yeah, I've created #363 for this, but that is not simple change as I expected because of how buffer for store event content is handled. Events borrow from that buffer and its instance moved into generic function, so it is not possible just to add a loop here: Lines 511 to 526 in d872771
that would skip empty text events, because buffer moves at first iteration. |
Generating of empty events was fixed in #398; please comment here with additional info if it does not solve your case and I'll reopen |
I wrote a function to prettify a one-line xml, but it failed.
I found that in the
read_until_open
function in reader, it returnsText
event always. But thewrite_event
function will always setI guess that's why it failed.
Maybe an empty text event should not be returned in the
read_event
function?The text was updated successfully, but these errors were encountered: