Author: rob.stryker(a)jboss.com
Date: 2009-11-06 19:00:27 -0500 (Fri, 06 Nov 2009)
New Revision: 18461
Modified:
trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/util/XMLMemento.java
Log:
Added a remove node method
Modified:
trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/util/XMLMemento.java
===================================================================
---
trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/util/XMLMemento.java 2009-11-06
18:29:39 UTC (rev 18460)
+++
trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/util/XMLMemento.java 2009-11-07
00:00:27 UTC (rev 18461)
@@ -68,6 +68,10 @@
return new XMLMemento(factory, child);
}
+ public void removeChild(XMLMemento child) {
+ element.removeChild(child.element);
+ }
+
/**
* Create a Document from a Reader and answer a root memento for reading
* a document.
@@ -417,4 +421,12 @@
textNode.setData(data);
}
}
+
+ public String getTextData() {
+ Text textNode = getTextNode();
+ if (textNode != null) {
+ return textNode.getData();
+ }
+ return ""; //$NON-NLS-1$
+ }
}
\ No newline at end of file
Show replies by date