Hio andreas,
Welcome to XML.
first the xml code is not well-formed,There are many occurances of '<' and '>' at unwanted places,so correct that.
i'm sending u the code for ur problem
try
{
DOMParser parser = new DOMParser();
parser.parse("your file goes here");
Document
doc = parser.getDocument();
NodeList nl1 = doc.getElementsByTagName("userrole");
Node n = null;
for(int i=0;i<nl1.getLength();i++)
{
n = nl1.item(i);
if(n.getNodeType() == Node.ELEMENT_NODE)
{
if(n.hasChildNodes())
{
NodeList nl2 = n.getChildNodes();
String temp[] = new String(nl2.getLength());
for(int k=0;k<nl2.getLength();k++)
{
temp[k]=nl2.item(k).getNodeValue());
}
}
}
}
}
catch(Exception e)
{
System.out.println(e.getMessage());
}
}
This would help.