[Gambas-user] doubts about how to use xmlreader

Santiago Oberto santiago_j_oberto at ...1877...
Sat Jul 17 19:41:55 CEST 2010


Good morning,

I am trying to prase an xml which has many attribute in eache element.

I have been surfing and reading the few documentation that exists but I
couldnt figure it out.

I would like to read this xml file and store in an array each attribute
of each element.

If someone could give a hand and a clue of how to keep going, I would it
appreciate it.

Thank you so much in advanced.

Santiago.

Here is an example of the xml file i want to read (i tried and i was
able to write a similar xml file with xmlwriter):

<?xml version="1.0" encoding="utf-8"?>
<information>
  <ALUA name="ALUA" term="72hs" bidcount="10852" bid="3.71" ask="3.72"
askcount="3683" last="3.72" datetime="12/07/2010 16:59:00" change="0.81"
high="3.72" low="3.67" volume="133532" operations="87"/>
  <APBR name="APBR" term="72hs" bidcount="600" bid="71.6" ask="71.9"
askcount="1591" last="71.8" datetime="12/07/2010 16:57:00"
change="-1.58" high="72.8" low="71.5" volume="15619" operations="97"/>
  <BHIP name="BHIP" term="72hs" bidcount="12000" bid="1.52" ask="1.53"
askcount="5000" last="1.53" datetime="12/07/2010 17:00:00" change="1.32"
high="1.53" low="1.5" volume="131996" operations="39"/>
  <BMA name="BMA" term="72hs" bidcount="8589" bid="12.4" ask="12.5"
askcount="953" last="12.45" datetime="12/07/2010 16:59:00" change="0.4"
high="12.6" low="12.45" volume="56288" operations="52"/>
  <BPAT name="BPAT" term="72hs" bidcount="800" bid="4.52" ask="4.53"
askcount="1500" last="4.52" datetime="12/07/2010 16:53:00"
change="-0.44" high="4.53" low="4.51" volume="99844" operations="36"/>
  <EDN name="EDN" term="72hs" bidcount="33796" bid="1.32" ask="1.33"
askcount="16824" last="1.32" datetime="12/07/2010 16:51:00"
change="-0.75" high="1.33" low="1.32" volume="168087" operations="33"/>
  <ERAR name="ERAR" term="72hs" bidcount="871" bid="27.1" ask="27.2"
askcount="2959" last="27.2" datetime="12/07/2010 17:01:00"
change="-1.09" high="27.5" low="26.8" volume="45294" operations="88"/>
  <FRAN name="FRAN" term="72hs" bidcount="1705" bid="8.9" ask="8.95"
askcount="520" last="8.95" datetime="12/07/2010 16:59:00" change="1.7"
high="9.1" low="8.85" volume="247357" operations="113"/>
  <GGAL name="GGAL" term="72hs" bidcount="13200" bid="2.42" ask="2.44"
askcount="15700" last="2.42" datetime="12/07/2010 16:59:00"
change="0.83" high="2.47" low="2.41" volume="1340317"
operations="201"/>
  <MIRG name="MIRG" term="72hs" bidcount="3" bid="73.2" ask="73.5"
askcount="519" last="73.5" datetime="12/07/2010 17:00:00" change="1.24"
high="73.5" low="72.9" volume="4670" operations="53"/>
  <PAMP name="PAMP" term="72hs" bidcount="188140" bid="1.65" ask="1.66"
askcount="38160" last="1.65" datetime="12/07/2010 16:59:00"
change="1.85" high="1.67" low="1.63" volume="615892" operations="116"/>
  <PESA name="PESA" term="72hs" bidcount="1670" bid="5.92" ask="5.97"
askcount="782" last="5.96" datetime="12/07/2010 16:54:00" change="-0.33"
high="6" low="5.93" volume="77189" operations="44"/>
  <TECO2 name="TECO2" term="72hs" bidcount="1605" bid="13.45"
ask="13.55" askcount="24827" last="13.5" datetime="12/07/2010 17:00:00"
change="-0.74" high="13.65" low="13.4" volume="149304"
operations="155"/>
  <TRAN name="TRAN" term="72hs" bidcount="15000" bid="0.895" ask="0.898"
askcount="13108" last="0.895" datetime="12/07/2010 16:59:00"
change="0.56" high="0.898" low="0.885" volume="349388" operations="54"/>
  <TS name="TS" term="72hs" bidcount="4817" bid="74.85" ask="75.2"
askcount="1000" last="74.85" datetime="12/07/2010 16:59:00"
change="-0.2" high="76" low="74.6" volume="100403" operations="235"/>
</information>






More information about the User mailing list