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

Reparse element with same reader #280

Open
Zekfad opened this issue Apr 20, 2024 · 0 comments
Open

Reparse element with same reader #280

Zekfad opened this issue Apr 20, 2024 · 0 comments

Comments

@Zekfad
Copy link

Zekfad commented Apr 20, 2024

I'm in process of writing annotation (php 8.3) based (de)serialize methods and thinking about how to implement polymorphic node (select in xsd).

While it's possible to make an educated guess, meaning analyze candidate structures and try to see which one xml is actually follows, I think that solution is overly complicated to get it right.

I think of a try-catch parsing every candidate until first match. But to do so I need a way to reparse element with current reader options.

I'm thinking about cloning reader options to a new one and use fragment to get a stable copy of element descendants. Is there any better or convenient ways to achieve it?

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

1 participant