Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/c14nPublic

Haskell bindings for the c14n implementation in LibXML (XML canonicalisation)

License

NotificationsYou must be signed in to change notification settings

mbg/c14n

Repository files navigation

GitHubHaskellStackage NightlyHackage

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 havelibxml2 installed, including on macOS (withbrew install libxml2). Then build withstack build.

Usage

TheText.XML.C14N module exports a function namedc14n which provides a mid-level interface to the canonicalisation function fromlibxml2. It will handle most of the marshalling, but not much more. For example:

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

The arguments, in order, are:

  • Parser options, see the module documentation or thelibxml2 documentation
  • The canonicalisation specification to use (c14n_1_0,c14n_exclusive_1_0, orc14n_1_1).
  • A (potentially empty) list of namespace prefixes which is used when the canonicalisation specification used isc14n_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

About

Haskell bindings for the c14n implementation in LibXML (XML canonicalisation)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp