Giter VIP home page Giter VIP logo

c14n's Introduction

c14n

GitHub Haskell Stackage Nightly Hackage

Haskell bindings for the c14n implementation in libxml (XML canonicalisation). Unfortunately there is (at the time of writing) no pure Haskell implementation, so this seems like the best option.

Requirements

You need to have libxml2 installed, including on macOS (with brew install libxml2). Then build with stack build.

Usage

The Text.XML.C14N module exports a function named c14n which provides a mid-level interface to the canonicalisation function from libxml2. It will handle most of the marshalling, but not much more. For example:

> c14n [] c14n_1_1 [] False Nothing "<root>foo<!-- comment -->bar</root>"
"<root>foobar</root>"

The arguments, in order, are:

  • Parser options, see the module documentation or the libxml2 documentation
  • The canonicalisation specification to use (c14n_1_0, c14n_exclusive_1_0, or c14n_1_1).
  • A (potentially empty) list of namespace prefixes which is used when the canonicalisation specification used is c14n_exclusive_1_0
  • A boolean value indicating whether to keep comments in the output or not.
  • An XPath location path used to select a set of nodes that should be included in the canonicalised result

c14n's People

Contributors

fumieval avatar lol768 avatar mbg avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.