Learn R Programming

xslt (version 0.0.0.9002)

read_xslt: Read in an XSLT document

Description

Lightweight wrapper for read_xml

Usage

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

Run this code
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))

Run the code above in your browser using DataLab