Skip to main content

Tool to process an RFC or Internet Standard into XML. Structure can also be accessed directly within a seperate Python project.

Project description

rfc2xml

Tool to process an RFC or Internet Standard into XML. Structure can also be accessed directly within a seperate Python project.

Note that this is not a general purpose tool and contains some restrictions. This is currently really slow. This is due partly to to overhead from Python, the parsing library and some inefficient parser grammar.

Usage

python -m rfc2xml <filename> [--suppress-result]

Examples

Download an Internet Standard to process:

wget https://www.ietf.org/id/draft-ietf-quic-transport-19.txt

The tool can then be run on that file using the following command (in the top level src directory):

python -m rfc2xml draft-ietf-quic-transport-19.txt

Import

The tool can also be imported into a different python script and used there:

from rfc2xml import Rfc2Xml
with open("draft-ietf-quic-transport-19.txt") as fp:
    contents = fp.read()
dom = Rfc2Xml.parse(contents)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rfc2xml-0.1.2.tar.gz (10.2 kB view hashes)

Uploaded Source

Built Distributions

rfc2xml-0.1.2-py3.7.egg (37.6 kB view hashes)

Uploaded Source

rfc2xml-0.1.2-py3-none-any.whl (17.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page