List of utility methods to do XML Child Element Create
IIOMetadataNode | getOrCreateChildNode(IIOMetadataNode parentNode, String name) Gets the named child node, or creates and attaches it. NodeList nodeList = parentNode.getElementsByTagName(name); if (nodeList != null && nodeList.getLength() > 0) { return (IIOMetadataNode) nodeList.item(0); IIOMetadataNode childNode = new IIOMetadataNode(name); parentNode.appendChild(childNode); return childNode; |
Text | getOrCreateFirstTextChild(Element node) get Or Create First Text Child NodeList children = node.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { Node child = children.item(i); if (child instanceof Text) { return (Text) child; Text result = node.getOwnerDocument().createTextNode(""); ... |
boolean | hasActivityChildNodeWithCreateInstanceSet(Node node) has Activity Child Node With Create Instance Set boolean result = false; for (Node child : getAllActivityChildNodesRecursively(node)) { if (isCreateInstanceSet(child)) result = true; return result; |