20 package net.sf.gridarta.utils;
22 import nu.xom.Element;
23 import nu.xom.Elements;
24 import org.jetbrains.annotations.NotNull;
46 public static Element
getChild(@NotNull
final Element parentElement, @NotNull
final String childName) {
47 final Elements elements = parentElement.getChildElements(childName);
48 if (elements.size() == 0) {
49 throw new IllegalArgumentException(
"child element '" + childName +
"' does not exist");
51 return elements.get(0);
XML related utility functions.
XmlUtils()
Private constructor to prevent instantiation.
static Element getChild(@NotNull final Element parentElement, @NotNull final String childName)
Returns a child Element of a parent element.