-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Labels
Milestone
Description
My Usecase
I want to modify .fodt Files and replace the placeholders inside the document with values from a Database.
Now I gather multiple matches via the nextUntil(Filter) Method. Currently I need to do something like this to deep copy all elements:
List<ProjectDTO> projects;
Match projectMatches = aMatch.nextUntil(filter);
projects.stream().forEach(project -> {
List<Element> deepCopies = projectMatches.each()
.stream().map(val -> (Element) val.get(0).cloneNode(true))
.toList();
Match copy = $();
copy = copy.add((deepCopies.toArray(new Element[deepCopies.size()])));
//Do Stuff with the copy
});
There is Probably a cleaner way, but it would be nice if I could just call projectMatches.deepCopy()
Versions:
- jOOX:2.0.0
- Java:17
Reactions are currently unavailable