+
+ final String docRootElm = doc.getDocumentElement().getLocalName();
+ final String schemaNodeName = pathContext.getSchemaNode().getQName().getLocalName();
+
+ // TODO : do we want to really follow netconf-restconf specification ?
+ if (!schemaNodeName.equalsIgnoreCase(docRootElm)) {
+ final Collection<DataSchemaNode> children = ((DataNodeContainer) schemaNode).getChildNodes();
+ for (final DataSchemaNode child : children) {
+ if (child.getQName().getLocalName().equalsIgnoreCase(docRootElm)) {
+ schemaNode = child;
+ break;
+ }
+ }
+ }
+
+ // FIXME the factory instance should be cached if the schema context is the same
+ final DomToNormalizedNodeParserFactory parserFactory =
+ DomToNormalizedNodeParserFactory.getInstance(XmlUtils.DEFAULT_XML_CODEC_PROVIDER, pathContext.getSchemaContext());
+