HI,
This may sound like the sort of question which warrants an answer in the form "try reading the javadocs" but the JDOM website is hanging when i try and download the JDOM javadocs so I am in a bit of a bind here and any help much appreciated.
I have an xml document such as :
<template>
<name>My Template</name>
<template_atoms>
<atom>
<atom_name>Bob</atom_name>
<atom_age>23</atom_age>
</atom>
<atom>
<atom_name>Shirley</atom_name>
<atom_age>54</atom_age>
</atom>
</template_atoms>
</template>
I need to be able to do two things, given that I have a Document doc:
1. simply get the text between an element like this: String data = doc.getElementText("name").toString() should return "My Template"
2. return a Hashtable or similar collection of all the <atom> elements such that <atom_name> data is used as key and <atom_age>data is the value.
Without the javadoc I am not going to get very far! Thanks for your help
hugh
Edited by: Hacland on Jan 10, 2008 3:04 AM