New Version of RAX with write capabilities, and RAX Website


Date:      Wed, 03 May 2000 19:32:53 +0100
From:      Sean McGrath <digitome@iol.ie>
To:        xml-dev@xml.org
Subject:   New RAX with write capabilities + Website

I have put RAX (Record API for XML) on the Web at:

     http://www.digitome.com/rax.html.

I have added writing capabilities so you can now use RAX as a "pull API" for read/write XML applications. Simply put, you can read records, modify them and write them out again as XML.

RAX is intended to present programmers with a drop-dead easy API for processing record-oriented XML. The reference implementation is Python but it should be very easy to port it to other languages.

Contributions to the evolution of RAX and contributions in other languages are hereby solicited!

From the docstring:

A simple, record-oriented API for XML. Provides a simple, efficient interface for processing the sort of XML often generated from databases.

See http://www.xml.com/pub/2000/04/26/rax for an introductory article.

RAX processes the PYX notation for parsed XML introduced in http://www.xml.com/pub/2000/03/15/feature/index.html.

PYX generators are freely available from http://www.pyxie.org:

RAX consists of two very simple interfaces:
	The RAX Interface
	The Record Interface

The RAX Interface
	SetRecord - Tell RAX what the top level record element is.
	ReadRecord - Read a record
	WriteRecord - Write a record to XML format

The Record Interface
	GetElement - Retrieve the value of an element
	SetElement - Set the value of an element

Sample RAX Usage:
	from RAX import RAX,Record
    import os

	# Parse XML to PYX notation Pipe
	fo = os.popen ("xmln customers.xml")
	R = RAX(fo)
    # Tell RAX that the "Record" element is the top level element
	R.SetRecord("Record")
	rec = R.ReadRecord()
	while rec:
		  # Get value of "Phone" element
		  x = rec.GetElement ("Phone")
		  # Set phone element to "12345"
		  rec.SetElement("Phone","12345")
		  # Write out modified record
		  R.WriteRecord (rec)

		  rec = R.ReadRecord()

regards,
Sean McGrath


This is xml-dev, the mailing list for XML developers.
List archives are available at http://xml.org/archives/xml-dev/