read_xslt: Read in an XSLT document

Description Usage Arguments Value Examples

View source: R/xslt.R

Description

Lightweight wrapper for read_xml

Usage

1
read_xslt(xslt_src)

Arguments

xslt_src

an XSLT document (either a string with XML/XSLT, a filename or URL pointing to a file wiht XML/XSLT)

Value

This has the same return value as xml2::read_xml but adds xslt_document to the class list for potential future use with this package.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(xslt)

xslt_src <- '<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:template match="/">
    <article>
      <title>Hello World</title>
    </article>
  </xsl:template>
</xsl:stylesheet>'

xsl <- read_xslt(xslt_src)
(class(xsl))

hrbrmstr/xslt documentation built on May 16, 2017, 11:24 p.m.