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

add support for XmlCDATA text #45

Closed
wants to merge 2 commits into from

Conversation

mevljas
Copy link

@mevljas mevljas commented Aug 1, 2023

Describe the change
I've implemented support for extracting text from XmlCDATA children.

Current behavior
Currently only extracting text from XmlText children is supported.

New behavior
Now getText method returns both text from XmlText and XmlCDATA children. The text is also trimmed because XmlCDATA elements contain leading and trailing whitespace.

Additional context
I'm not sure if this is the correct way to handle this. Maybe we could add another method only for handling XmlCDATA children?

@mevljas mevljas changed the title Feature xml cdata support add support for XmlCDATA text Aug 1, 2023
@mevljas mevljas marked this pull request as ready for review August 1, 2023 11:32
@tnc1997
Copy link
Owner

tnc1997 commented Aug 2, 2023

Hi @mevljas, thank you very much for your contribution! I will need to spend a bit of time considering how we handle CDATA, because using the pre-existing @XmlText annotation wouldn't cover the use case of serializing fields as CDATA.

@mevljas
Copy link
Author

mevljas commented Aug 2, 2023

Understandable. We could just create another annotation :)

@mevljas mevljas closed this Aug 2, 2023
@mevljas
Copy link
Author

mevljas commented Aug 2, 2023

I'll continue using my fork for now because it covers my requirements.

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

Successfully merging this pull request may close these issues.

None yet

2 participants