Project

rfcxml

0.0
The project is in a healthy, maintained state
IETF RFC XML parser and generator
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

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:

gem 'rfcxml'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install rfcxml

Usage

To parse an RFC XML document:

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:

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.

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

All rights reserved. Ribose.