solve the XML declaration problem
diff --git a/R/add_indent.R b/R/add_indent.R
index abcf058..cb4c141 100644
--- a/R/add_indent.R
+++ b/R/add_indent.R
@@ -79,8 +79,7 @@
       xml_attr(node_to_edit, "indentLevel") <- indentLevel + 1
     }
   }
-  out <- structure(as.character(kable_xml), format = "html",
-                   class = "knitr_kable")
+  out <- as_kable_xml(kable_xml)
   attributes(out) <- kable_attrs
   return(out)
 }