xml_parse_data
converts this information to an XML tree.
The R parser's token names are preserved in the XML as much as
possible, but some of them are not valid XML tag names, so they are
renamed, see the xml_parse_token_map
vector for the
mapping.
The top XML tag is <exprlist>
, which is a list of
expressions, each expression is an <expr>
tag. Each tag
has attributes that define the location: line1
, col1
,
line2
, col2
. These are from the getParseData
data frame column names.
See an example below. See also the README at
https://github.com/r-lib/xmlparsedata#readme
for examples on how to search the XML tree with the xml2
package
and XPath expressions.
Note that `xml_parse_data()` silently drops all control characters
(0x01-0x1f) from the input, except horizontal tab (0x09) and newline
(0x0a), because they are invalid in XML 1.0.