- return child;
- }
-
- /**
- * Find child schema node identified by its QName within a provided schema node. This method performs lookup
- * in both the namespace of groupings and the namespace of all leafs, leaf-lists, lists, containers, choices, rpcs,
- * actions, notifications, anydatas and anyxmls according to RFC6050/RFC7950 section 6.2.1.
- *
- * <p>
- * This method is deprecated, because name conflicts can occur between the namespace of groupings and namespace
- * of data nodes and in consequence lookup could be ambiguous.
- *
- * @param node
- * schema node
- * @param qname
- * QName
- * @return child schema node
- * @throws IllegalArgumentException
- * if the schema node does not allow children
- *
- * @deprecated Use {@link #findChildSchemaNodesByQName(SchemaNode, QName)} instead.
- */
- @Deprecated
- public static SchemaNode findChildSchemaByQName(final SchemaNode node, final QName qname) {
- SchemaNode child = findDataChildSchemaByQName(node, qname);
- if (child == null && node instanceof DataNodeContainer) {
- child = tryFindGroupings((DataNodeContainer) node, qname).orNull();
- }
-
- return child;