pnt.getContent(Filters.processinginstruction()); return getPositionPath(content, sibs, "processing-instruction()", buffer);
public static void removeChangeTracking(Element element) { for (Iterator<ProcessingInstruction> iter = element.getDescendants(Filters.processinginstruction()) .iterator(); iter.hasNext();) { if (iter.next().getTarget().startsWith(PREFIX)) { iter.remove(); } } }
public MCRChangeData findLastChange(Document doc) { String typePrefix = PREFIX + counter + "-"; for (ProcessingInstruction instruction : doc.getDescendants(Filters.processinginstruction())) { String target = instruction.getTarget(); if (target.startsWith(typePrefix)) { return new MCRChangeData(instruction, typePrefix); } } throw new MCRException("Lost processing instruction for undo, not found: " + typePrefix); }