We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32cdb35 commit 7a22acaCopy full SHA for 7a22aca
src/main/java/org/scijava/util/XML.java
@@ -241,6 +241,13 @@ public static String cdata(final Node item) {
241
return null;
242
}
243
244
+ /** Gets the CData beneath the given element's specified child. */
245
+ public static String cdata(final Element el, final String child) {
246
+ NodeList children = el.getElementsByTagName(child);
247
+ if (children == null || children.getLength() == 0) return null;
248
+ return cdata(children.item(0));
249
+ }
250
+
251
// -- Helper methods --
252
253
/** Loads an XML document from the given file. */
0 commit comments