Sha256: f09a8b428d367668dc5e053acef0cb1716704abf13927625e7a6cad7cadabcb0

Contents?: true

Size: 1.13 KB

Versions: 1

Compression:

Stored size: 1.13 KB

Contents

= RFC XML Ruby library

The `rfcxml` library is a parser and generator for RFC XML documents. It is
intended to be used to parse and generate RFC XML v3 documents.


== Installation

Add this line to your application's Gemfile:

[source,ruby]
----
gem 'rfcxml'
----

And then execute:

[source]
----
$ bundle install
----

Or install it yourself as:

[source]
----
$ gem install rfcxml
----



== Usage

To parse an RFC XML document:

[source,ruby]
----
require 'rfcxml'

rfc = Rfcxml::Document.new(File.read('rfc.xml'))
puts rfc.title
puts rfc.abstract
puts rfc.sections
----

To generate an RFC XML document:

[source,ruby]
----
require 'rfcxml'

rfc = Rfcxml::Document.new
rfc.title = 'An RFC Title'
rfc.abstract = 'An RFC Abstract'
rfc.sections = [
  Rfcxml::Section.new('Section 1', 'This is the first section'),
  Rfcxml::Section.new('Section 2', 'This is the second section')
]

puts rfc.to_xml
----



== Contributing

Bug reports and pull requests are welcome on GitHub at
https://github.com/metanorma/rfcxml.


== Copyright and license

The gem is available as open source under the terms of the BSD 2-clause license.

All rights reserved. Ribose.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rfcxml-0.2.0 README.adoc