C14N-r
Project home: www.rubyforge.org/projects/c14n-r Author : Roland Schmitt, [email protected] Date : 12.05.2007
Version : 0.1
Contents
1. What is it (and what is it not)
2. Requirements
3. Installation
4. Usage
5. Samples
6. License
7. Support
8. URLs
1. What is it (and what is it not)
C14N-r stands for "xml canonicalizer for ruby". It implements the "Canonical XML
Version 1.0" recommendation from the w3c [1].
c14n-r is a sub-project from wss4r [2], an implementation of some web service security standards.
If you like it or hate it or want more features, drop me an email at [email protected].
2. Requirements
log4r >= 1.0.4
3. Installation
Simly do: gem install –local XMLCanonicalizer-0.1.gem
4. Usage
require “xmlcanonicalizer” c = Xml::Util::XmlCanonicalizer.new(true,true) #XmlCanonicalizer.new(WITH_COMMENTS, EXCLUSIVE_MODE) c.canonicalize_element(element, false) #XmlCanonicalizer::canonicalize_element(element, LOGGING)
5. Examples
require "xmlcanonicalizer"
require "rexml/document"
include REXML
string = <<EOF
<mydoc>
<someelement attribute="nanoo">Text, text, text</someelement><anotherelement/>
</mydoc>
EOF
doc = Document.new(string)
c = XML::Util::XmlCanonicalizer.new(true,true)
doc = c.canonicalize(doc)
puts(doc.to_s())
6. License
C14N-r is licensed under GPL and Ruby's custom license. See GPL and RUBYS.
7. Support
The RubyForge mailing list is at www.rubyforge.org/projects/c14n-r.
Or, to contact the author, send mail to [email protected]
8. URLs
[1] - http://www.w3.org/TR/xml-c14n
[2] - http://www.rubyforge.org/projects/wss4r