Transform XML documents to any other document type using XSLT stylesheets.
This is a Julia wrapper for the libxslt library.
XSLT.jl is fully compatible with EzXML.jl and LightXML.jl, so you can use it to transform XML documents to HTML, JSON, etc...
The package can be installed with the Julia package manager. From the Julia REPL, type ]
to enter the Pkg REPL mode and run:
pkg> add XSLT
Or, equivalently, via the Pkg
API:
julia> import Pkg; Pkg.add("XSLT")
julia> using XSLT
julia> xml_file = joinpath(dirname(pathof(XSLT)), "..", "test", "files", "cd_catalog.xml")
julia> xslt_file = joinpath(dirname(pathof(XSLT)), "..", "test", "files", "cd_catalog.xsl")
julia> xml_xslt(xml_file, xslt_file)
julia> using XSLT
julia> xml = read_xml(joinpath(dirname(pathof(XSLT)), "..", "test", "files", "cd_catalog.xml"))
julia> xslt = read_stylesheet(joinpath(dirname(pathof(XSLT)), "..", "test", "files", "cd_catalog.xsl"))
julia> xml_xslt(xml, xslt)
julia> using XSLT, EzXML
julia> xml = readxml(xml_file)
julia> xml_xslt(xml, xslt_file) |> parsehtml
julia> using XSLT, LightXML
julia> xml = parse_file(xml_file)
julia> xml_xslt(xml, xslt_file)
- libxslt - the C library used by this package
- xslt R package, from the rOpenSci organization, from which the API name is inspired
- The different official bindings in other languages: