I want to use
Java and DOM parser. (Not that I know doing it in other language/with SAX, etc.)
I want to get the values of the attributes of the "group" node(?). ("Node" may not be the right nomenclature, please correct if it is not.)
Ex. For "B1" band, grpID attribute is "1" and numStdGrp attribute is "15".
Here is my XML file:
What I have done so far:
(1) numStudent and dataMain node is easy:
ex.
get node by nListDM.item(0), and use getNodeName() to display name
(2) band node can also be retrieved with getElementsByTagName.
I am stuck right after this.
How do I get attribute values of the node "group"?
getElementsByTagName(group) is probably bad idea: which band's group? Confusing.
Gurus, please give me some idea.
Thank you for taking time to read and possibly answer.