OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: New RAX with write capabilities + Website

[ Lists Home | Date Index | Thread Index ]
  • From: Ken MacLeod <ken@bitsko.slc.ut.us>
  • To: <xml-dev@xml.org>, <perl-xml@listserv.activestate.com>
  • Date: 04 May 2000 09:21:02 -0500

Sean McGrath <digitome@iol.ie> writes:

> I have put RAX (Record API for XML) on the Web at
> 
> http://www.digitome.com/rax.html

> 		  # 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)

Curious, why the get/set approach rather than native accessor syntax?

  Python:

    x = rec.Phone
    rec.Phone = "12345"

  Perl:

    $x = $rec->{Phone};
    $rec->{Phone} = "12345";

If the answer is "you can do both", that's OK then.

  -- Ken

***************************************************************************
This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@xml.org&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS