* @return base type definition
      */
     static TypeDefinition<?> resolveBaseTypeFrom(TypeDefinition<?> type) {
-        TypeDefinition superType;
-        for(superType = type; superType.getBaseType() != null;
-            superType = superType.getBaseType()) {
+        TypeDefinition superType = type;
+        while (superType.getBaseType() != null) {
+            superType = superType.getBaseType();
         }
         return superType;
     }
-
 }
 
 
     @Override
     public void start(PropertiesNode node) {
-        //Do Nothing.
+        rootElement = addElement(null, node);
+        elementStack.push(rootElement);
     }
 
     @Override
     public void end(PropertiesNode node) throws SvcLogicException {
+        xmlData = rootElement.asXML();
         xmlData = UTF_HEADER + xmlData;
         writer = getXmlWriter(xmlData, "4");
     }
                         NODE_TYPE_ERR, node.nodeType().toString()));
         }
         if (element != null) {
-            if (elementStack.isEmpty()) {
-                rootElement = element;
-            }
             elementStack.push(element);
         }
     }
             case MULTI_INSTANCE_NODE:
             case MULTI_INSTANCE_LEAF_NODE:
             case SINGLE_INSTANCE_LEAF_NODE:
-                if (!elementStack.isEmpty() &&
-                        elementStack.peek().equals(rootElement)) {
-                    xmlData = rootElement.asXML();
-                } else {
+                if (!elementStack.isEmpty()) {
                     elementStack.pop();
                 }
                 break;
 
         PropertiesNodeXmlListener xmlListener = new PropertiesNodeXmlListener();
         nodeWalker.walk(xmlListener, propNode);
         Writer writer = xmlListener.getWriter();
-        return writer.toString();
+        return removeRootNode(writer.toString(), propNode.name());
     }
 
     @Override
         return serializerContext().getPropNodeSerializer().decode(
                 listener.serializerHelper().getPropertiesNode());
     }
+
+    /**
+     * Removes root node from the XML data format message and makes the
+     * string to be pretty print.
+     *
+     * @param xml      XML data format message
+     * @param rootName root node name
+     * @return pretty print format XML message
+     */
+    private static String removeRootNode(String xml, String rootName) {
+        xml = xml.replace("\n<" + rootName + ">", "\n");
+        xml = xml.replace("</" + rootName + ">" + "\n", "");
+        xml = xml.replaceAll("\n" + "    ", "\n");
+        xml = xml.replaceFirst("\n", "");
+        return xml;
+    }
 }
\ No newline at end of file
 
 import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_XML_ID;
 import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_XML_RPC;
 import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_XML_YANG;
+import static org.onap.ccsdk.sli.plugins.yangserializers.dfserializer.DataFormatUtilsTest.ENCODE_TO_XML_YANG_AUG_POST;
 
 
 /**
         assertThat(dfCaptor.getResult(), is(ENCODE_TO_XML_YANG));
     }
 
+    /**
+     * Verifies encoding of parameters to XML data format with augment as
+     * root child.
+     *
+     * @throws SvcLogicException when test case fails
+     */
+    @Test
+    public void encodeToXmlWithAugAsRootChild() throws SvcLogicException {
+        String pre = "test-yang:cont1.cont2.";
+        SvcLogicContext ctx = createAttListYang(pre);
+        p.put("dirPath", "src/test/resources");
+        p.put("format", "xml");
+        p.put("httpMethod", "post");
+        p.put("restapiUrl", "http://echo.getpostman" +
+                ".com/restconf/operations/test-yang:cont1/cont2/cont4");
+        restconf.sendRequest(p, ctx);
+        assertThat(dfCaptor.getResult(), is(ENCODE_TO_XML_YANG_AUG_POST));
+    }
+
     /**
      * Verifies decoding of parameters from XML data format with containers,
      * grouping and augment.
 
             "    }\n" +
             "}";
 
+    static final String ENCODE_TO_XML_YANG_COMMON = "\n" +
+            "<cont13 xmlns=\"urn:opendaylight:params:xml:ns:yang:" +
+            "augment\">\n" +
+            "    <ll9>abc</ll9>\n" +
+            "    <ll9>abc</ll9>\n" +
+            "    <list9>\n" +
+            "        <leaf27>abc</leaf27>\n" +
+            "    </list9>\n" +
+            "    <list9>\n" +
+            "        <leaf27>abc</leaf27>\n" +
+            "    </list9>\n" +
+            "    <leaf28>abc</leaf28>\n" +
+            "    <cont12>\n" +
+            "        <leaf26>abc</leaf26>\n" +
+            "    </cont12>\n" +
+            "</cont13>\n" +
+            "<list7 xmlns=\"urn:opendaylight:params:xml:ns:yang:a" +
+            "ugment\">\n" +
+            "    <leaf14>test</leaf14>\n" +
+            "</list7>\n" +
+            "<list7 xmlns=\"urn:opendaylight:params:xml:ns:yang:a" +
+            "ugment\">\n" +
+            "    <leaf14>create</leaf14>\n" +
+            "</list7>\n" +
+            "<leaf15 xmlns=\"urn:opendaylight:params:xml:ns:yang:" +
+            "augment\">abc</leaf15>\n" +
+            "<ll6 xmlns=\"urn:opendaylight:params:xml:ns:yang:aug" +
+            "ment\">unbounded</ll6>\n" +
+            "<ll6 xmlns=\"urn:opendaylight:params:xml:ns:yang:aug" +
+            "ment\">8</ll6>\n" +
+            "<cont5 xmlns=\"urn:opendaylight:params:xml:ns:yang:a" +
+            "ugment\">\n" +
+            "    <leaf13>true</leaf13>\n" +
+            "</cont5>";
+
+    static final String ENCODE_TO_XML_YANG_AUG_POST = "<?xml version=\"1.0\"" +
+            " encoding=\"UTF-8\" standalone=\"no\"?>\n" +
+            "<leaf10 xmlns=\"urn:opendaylight:params:xml:ns:yang:test\">abc" +
+            "</leaf10>" +
+            ENCODE_TO_XML_YANG_COMMON + "\n";
+
     static final String ENCODE_TO_XML_YANG = "<?xml version=\"1.0\" encoding" +
             "=\"UTF-8\" standalone=\"no\"?>\n" +
             "<cont2 xmlns=\"urn:opendaylight:params:xml:ns:yang:test\">\n" +
             "    <ll5>abc</ll5>\n" +
             "    <ll5>abc</ll5>\n" +
             "    <cont4>\n" +
-            "        <leaf10>abc</leaf10>\n" +
-            "        <cont13 xmlns=\"urn:opendaylight:params:xml:ns:yang:" +
-            "augment\">\n" +
-            "            <ll9>abc</ll9>\n" +
-            "            <ll9>abc</ll9>\n" +
-            "            <list9>\n" +
-            "                <leaf27>abc</leaf27>\n" +
-            "            </list9>\n" +
-            "            <list9>\n" +
-            "                <leaf27>abc</leaf27>\n" +
-            "            </list9>\n" +
-            "            <leaf28>abc</leaf28>\n" +
-            "            <cont12>\n" +
-            "                <leaf26>abc</leaf26>\n" +
-            "            </cont12>\n" +
-            "        </cont13>\n" +
-            "        <list7 xmlns=\"urn:opendaylight:params:xml:ns:yang:a" +
-            "ugment\">\n" +
-            "            <leaf14>test</leaf14>\n" +
-            "        </list7>\n" +
-            "        <list7 xmlns=\"urn:opendaylight:params:xml:ns:yang:a" +
-            "ugment\">\n" +
-            "            <leaf14>create</leaf14>\n" +
-            "        </list7>\n" +
-            "        <leaf15 xmlns=\"urn:opendaylight:params:xml:ns:yang:" +
-            "augment\">abc</leaf15>\n" +
-            "        <ll6 xmlns=\"urn:opendaylight:params:xml:ns:yang:aug" +
-            "ment\">unbounded</ll6>\n" +
-            "        <ll6 xmlns=\"urn:opendaylight:params:xml:ns:yang:aug" +
-            "ment\">8</ll6>\n" +
-            "        <cont5 xmlns=\"urn:opendaylight:params:xml:ns:yang:a" +
-            "ugment\">\n" +
-            "            <leaf13>true</leaf13>\n" +
-            "        </cont5>\n" +
+            "        <leaf10>abc</leaf10>"+
+            addSpace(ENCODE_TO_XML_YANG_COMMON, 8) + "\n" +
             "    </cont4>\n" +
             "    <ll4>abc</ll4>\n" +
             "    <ll4>abc</ll4>\n" +
             "    </list6>\n" +
             "</cont2>\n";
 
-
     static final String ENCODE_TO_JSON_RPC = "{\n" +
             "    \"test-yang:input\": {\n" +
             "        \"leaf30\": \"abc\",\n" +