rexml/document problem

C

Cool Wong

Code:
<?xml version="1.0"?>
<a>

<b prefix="A" num="1" />
<b perfix="B" num="2" />
<b prefix="C" num="3" />
<b prefix="D" num="4" />
<b prefix="F" num="5" />
</a>

This is my xml file data. There include several <b> in the xml file. i
can read the 1st data:

puts root.elements["b"].attributes["prefix"]

Now i cannot read the <b> 1 by 1. How can i read the <b> and write the
output is:

"A"
"B"
"C"
"D"
"E"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,262
Messages
2,571,311
Members
47,986
Latest member
ColbyG935

Latest Threads

Top