In recent R versions the parser can attach source code location
information to the parsed expressions. This information is often
useful for static analysis, e.g. code linting. It can be accessed
an expression returned from
logical; whether to include the text of parsed items in the result
Whether to pretty-indent the XML output. It has a small overhead which probably only matters for very large source files.
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
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:
col2. These are from the
data frame column names.
See an example below. See also the README at
for examples on how to search the XML tree with the
and XPath expressions.
An XML string representing the parse data. See details below.
xml_parse_token_map for the token names.
https://github.com/MangoTheCat/xmlparsedata#readme for more
information and use cases.
1 2 3 4 5 6 7
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.