Xml-beginner

hi all
i hav a little beginner problem:
i use rexml on ruby 1.8
and the following xml:



12.3.2004
text ist das
/imqqqqqest.gif




ans i try to access the datum with this code
doc.elements.each(“tagebuch/monat/eintrag”) { |element| puts
element.elements[“datum”]}

and i get
12.3.2004

must i strip the tags with a regex ? i think there must be a better way
to do this.

···


thx
martin pfeffer
at
suse 9.0
Apache 2.0
http://eurowalker.is.dreaming.org

hi all
i hav a little beginner problem:
i use rexml on ruby 1.8
and the following xml:



12.3.2004
text ist das
/imqqqqqest.gif




ans i try to access the datum with this code
doc.elements.each(“tagebuch/monat/eintrag”) { |element| puts
element.elements[“datum”]}

and i get
12.3.2004

must i strip the tags with a regex ? i think there must be a better way
to do this.

element.elements[“datum”].text gives you the first child text-element.

···

On Wed, May 12, 2004 at 06:53:59PM +0900, Martin Uruz wrote:


thx
martin pfeffer
at
suse 9.0
Apache 2.0
http://eurowalker.is.dreaming.org