Skip to content

Improved wildcard node selector and added 3 more unittests#15

Merged
elementgreen merged 4 commits intoKymorphia:masterfrom
dejlek:dejan/xml_patch_improvements
Feb 16, 2026
Merged

Improved wildcard node selector and added 3 more unittests#15
elementgreen merged 4 commits intoKymorphia:masterfrom
dejlek:dejan/xml_patch_improvements

Conversation

@dejlek
Copy link
Copy Markdown
Contributor

@dejlek dejlek commented Feb 16, 2026

Wildcard node selector (*.child)
When the first selector is *, the code now passes wildNode=true to recurseTree, enabling recursive search through all descendants instead of just direct children.

Wildcard in attribute values (root.node[test*])
Added a hasWildAttrs() method to XmlSelector that checks if any attribute value contains *. The multi-match logic now considers selectors with wildcard attributes as multi-match selectors, so all matching nodes are returned instead of just the first one.

Fix 2: Wildcard in attribute values (root.node[test*])
}

assert(caught);
assertThrown!XmlPatchError(patch.apply(tree, null));
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As requested

@elementgreen elementgreen merged commit 094c390 into Kymorphia:master Feb 16, 2026
1 check passed
@dejlek dejlek deleted the dejan/xml_patch_improvements branch February 16, 2026 20:37
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.

2 participants