Determine the type of a node.
Examples
x <- read_xml("<foo> a <b /> <![CDATA[ blah]]></foo>")
xml_type(x)
#> [1] "element"
xml_type(xml_contents(x))
#> [1] "text" "element" "text" "cdata"
Determine the type of a node.
x <- read_xml("<foo> a <b /> <![CDATA[ blah]]></foo>")
xml_type(x)
#> [1] "element"
xml_type(xml_contents(x))
#> [1] "text" "element" "text" "cdata"