M
Martin Uruz
hi all
i hav a little beginner problem:
i use rexml on ruby 1.8
and the following xml:
<tagebuch>
<monat id="3">
<eintrag>
<datum>12.3.2004</datum>
<text>text ist das</text>
<imagelink>/imqqqqqest.gif</imagelink>
</eintrag>
</monat>
<monat id="4">
.............
</tagebuch>
ans i try to access the datum with this code
doc.elements.each("tagebuch/monat/eintrag") { |element| puts
element.elements["datum"]}
and i get
<datum>12.3.2004</datum>
......
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
i hav a little beginner problem:
i use rexml on ruby 1.8
and the following xml:
<tagebuch>
<monat id="3">
<eintrag>
<datum>12.3.2004</datum>
<text>text ist das</text>
<imagelink>/imqqqqqest.gif</imagelink>
</eintrag>
</monat>
<monat id="4">
.............
</tagebuch>
ans i try to access the datum with this code
doc.elements.each("tagebuch/monat/eintrag") { |element| puts
element.elements["datum"]}
and i get
<datum>12.3.2004</datum>
......
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