solve the XML declaration problem
diff --git a/R/kable_styling.R b/R/kable_styling.R
index 385b96f..fbd26f9 100644
--- a/R/kable_styling.R
+++ b/R/kable_styling.R
@@ -156,8 +156,7 @@
     xml_attr(kable_xml, "style") <- paste(kable_xml_style, collapse = " ")
   }
 
-  out <- structure(as.character(kable_xml), format = "html",
-                   class = "knitr_kable")
+  out <- as_kable_xml(kable_xml)
   attributes(out) <- kable_attrs
   return(out)
 }
@@ -358,3 +357,5 @@
     "\\endgroup"
   ))
 }
+
+