change read_xml to read_html + 2 xml_child
diff --git a/R/kable_styling.R b/R/kable_styling.R
index fbd26f9..bf2da86 100644
--- a/R/kable_styling.R
+++ b/R/kable_styling.R
@@ -101,7 +101,7 @@
                                            "float_left", "float_right"),
                               font_size = NULL) {
   kable_attrs <- attributes(kable_input)
-  kable_xml <- read_xml(as.character(kable_input), options = c("COMPACT"))
+  kable_xml <- read_kable_as_xml(kable_input)
 
   # Modify class
   bootstrap_options <- match.arg(