[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

New RAX with write capabilities + Website

  • From: Sean McGrath <sean@d...>
  • To: <xml-dev@x...>
  • Date: Wed, 03 May 2000 19:39:18 +0100

record oriented api for xml
(I am not at all sure what e-mail address(es) from me
are getting through to XML-DEV. Apologies if you
see this twice.)


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.
 xmln : generate PYX using non-validating XML parse
 xmlv : generate PYX using validating XML parse

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.
To unsubscribe, mailto:majordomo@x...&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.