- if (!schemaNodeName.equalsIgnoreCase(docRootElm)) {
- final DataSchemaNode foundSchemaNode = findSchemaNodeOrParentChoiceByName(schemaNode, docRootElm);
- if (foundSchemaNode != null) {
- if (schemaNode instanceof AugmentationTarget) {
- final AugmentationSchema augmentSchemaNode = findCorrespondingAugment(schemaNode, foundSchemaNode);
- if (augmentSchemaNode != null) {
- return parserFactory.getAugmentationNodeParser().parse(elements, augmentSchemaNode);
- }
+ if (isPost()) {
+ final Deque<Object> foundSchemaNodes = findPathToSchemaNodeByName(schemaNode, docRootElm);
+ while (!foundSchemaNodes.isEmpty()) {
+ final Object child = foundSchemaNodes.pop();
+ if (child instanceof AugmentationSchema) {
+ final AugmentationSchema augmentSchemaNode = (AugmentationSchema) child;
+ iiToDataList.add(SchemaUtils.getNodeIdentifierForAugmentation(augmentSchemaNode));
+ } else if (child instanceof DataSchemaNode) {
+ schemaNode = (DataSchemaNode) child;
+ iiToDataList.add(new YangInstanceIdentifier.NodeIdentifier(schemaNode.getQName()));