prettifyXML: Prettify XML

Description Usage Arguments Details Value

View source: R/prettifyXML.R

Description

Prettify some XML or SVG code.

Usage

1
prettifyXML(contents = NA, tabSize = NULL)

Arguments

contents

the code to be prettified; there are three possibilities for this argument: NA (default), to use the file currently opened in RStudio; the path to a file; or the code given as a character vector

tabSize

number of spaces of the indentation (usually 2 or 4); if NULL (the default), there are two possibilities: if the contents are read from the current file in RStudio, then the number of spaces will be the one you use in RStudio; otherwise it is set to 2

Details

The code is prettified with the help of the command line utility xmllint if it is available, otherwise the xml2 is used.

Value

The pretty code in a character string.


prettifyAddins documentation built on Jan. 25, 2022, 5:09 p.m.