Well, it looks like everything is working correctly. Each one of your "put"
commands is putting exactly what should be put.
Obviously, though, if you've got two elements in the document that use the
same tag name, then dot-access is only going to get you the first one.
You'll have to use the XML Lingo made available by the Xtra to roll your own
"getElementsByTagName" function that would return a list of all the
elemental property lists that match a given tag name.
Or you could look into DOM-Lingo when it goes into Public Preview in a few
days (again, as soon as I can get my host admin to get off his ass and link
my directory up). It has a Lingo-based XML processor, and an implementation
of the "getElementsByTagName" function from the DOM. It returns a NodeList
object, which can then be iterated.
Christopher Watson
Sr. Software Engineer
Lightspan, Inc.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 27, 2001 2:09 PM
To: [EMAIL PROTECTED]
Subject: <lingo-l> don't ya love the xml parser?
put tList
-- ["!ATTRIBUTES": ["score": "10", "playback": "student"], "directive":
["!ATTRIBUTES": [:]], "audiofile": ["!ATTRIBUTES": ["name": "example.wav",
"type": "example"], "transcript": ["!ATTRIBUTES": [:], "!CHARDATA": "What
is your name?"]], "audiofile": ["!ATTRIBUTES": ["name": "model.wav",
"type": "model"], "transcript": ["!ATTRIBUTES": [:], "!CHARDATA": "My name
is Jose."]]]
put tList.getPropAt(3)
-- "audiofile"
put tList.getPropAt(4)
-- "audiofile"
put tList.audiofile
-- ["!ATTRIBUTES": ["name": "example.wav", "type": "example"],
"transcript": ["!ATTRIBUTES": [:], "!CHARDATA": "What is your name?"]]
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]