/** * @param prefix a namespace prefix * @param node an xml node * @return if the namespace is valid according to the node hierarchy */ protected static boolean isParentNamespace(final String prefix, final XmlNode node) { boolean result = false; if ((node != null) && (node.getContent().isElement())) { for (XmlAttribute attr : node.getParent().getContent().getNamespaceAttributes()) { if (attr.getName().equals(prefix)) { result = true; break; } } } return result; }