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

XML Comments #144

Open
premek opened this issue Dec 8, 2016 · 1 comment
Open

XML Comments #144

premek opened this issue Dec 8, 2016 · 1 comment

Comments

@premek
Copy link

premek commented Dec 8, 2016

Allowing to work with XML comments would be a nice enhancement, however I'm not sure how would it fit into the current API.

Comment nodes are parsed by the XML parser but are discarded here

if (node.getNodeType() == Node.ELEMENT_NODE) {

So methods like children() gets only the elements, not the comments. (Which is correct by default but would be nice to be able to get commments too maybe)

Possible use case example:

  • delete selected nodes from xml file including the comment right before them
@lukaseder
Copy link
Member

Yes, that would be interesting, but jOOQ's Match type explicitly models an Element, keeping things simple, but reducing the set of possible functionalities. For instance, text of cdata nodes are also not possible right now, at least not if they're interleaved with other elements in a document style XML.

Perhaps there's a solution by creating a new super type of Match and then retrofit the existing Match to be an instance of that super type specific to elements...

But right now, this won't be a priority for jOOX...

@lukaseder lukaseder modified the milestones: Version 1.6.0, Version 1.7.0 Nov 30, 2017
@lukaseder lukaseder modified the milestones: Version 2.0.0, Version 2.1.0 Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants