summaryrefslogtreecommitdiffstats
path: root/org/madore/damlengine/TodoKillAElement.java
diff options
context:
space:
mode:
authorDavid A. Madore <david+git@madore.org>2011-08-28 22:35:34 +0200
committerDavid A. Madore <david+git@madore.org>2011-08-28 22:35:34 +0200
commit1710554809835a82415a1f8789bed3016c58fc96 (patch)
tree5fb7c9d65874e0157c06b79d24b679b3c1b233ff /org/madore/damlengine/TodoKillAElement.java
parenta0a7d6212299a1723cf6c0666f9838136934cc07 (diff)
downloaddamlengine-1710554809835a82415a1f8789bed3016c58fc96.tar.gz
damlengine-1710554809835a82415a1f8789bed3016c58fc96.tar.bz2
damlengine-1710554809835a82415a1f8789bed3016c58fc96.zip
Handling of weblog index (including killing nested a elements).
Diffstat (limited to 'org/madore/damlengine/TodoKillAElement.java')
-rw-r--r--org/madore/damlengine/TodoKillAElement.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/org/madore/damlengine/TodoKillAElement.java b/org/madore/damlengine/TodoKillAElement.java
new file mode 100644
index 0000000..ea63a05
--- /dev/null
+++ b/org/madore/damlengine/TodoKillAElement.java
@@ -0,0 +1,32 @@
+package org.madore.damlengine;
+
+import java.util.ArrayList;
+import org.w3c.dom.*;
+
+public final class TodoKillAElement extends TodoDefaultElement {
+
+ public static class Factory extends TodoElement.Factory {
+ @Override
+ public TodoKillAElement newItem(Element node,
+ Context ctx,
+ TodoItem caller) {
+ return new TodoKillAElement(node, ctx, caller);
+ }
+ }
+
+ public TodoKillAElement(Element node,
+ Context ctx,
+ TodoItem caller) {
+ super(node, ctx, caller);
+ }
+
+ @Override
+ public void handleNodeOnly() {
+ ArrayList<Node> childList = getChildList(node);
+ for ( Node child : childList ) {
+ node.getParentNode().insertBefore(child, node);
+ }
+ node.getParentNode().removeChild(node);
+ }
+
+}