[Home] [By Thread] [By Date] [Recent Entries]

  • From: Ken MacLeod <ken@b...>
  • To: <xml-dev@x...>, <perl-xml@l...>
  • Date: 04 May 2000 09:21:02 -0500

Sean McGrath <digitome@i...> 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@x...&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member