Tenho o seguinte xml:
<VDNs_XX>
<Skill Numero="55" Nome="Real">
<VDN Numero="83630" Status="Ativo" Label="xxxx"/>
<VDN Numero="83631" Status="Desativado" Label="yyyy"/>
<VDN Numero="83632" Status="Ativo" Label="aaaa"/>
<VDN Numero="83633" Status="Ativo" Label="ccccc"/>
</Skill>
</VDNs_XX>
Como pegar os valores de cada propriedade dessas tags usando o Dom:
Eu usava assim, mas para pegar algo em:
aaaa
Como adaptar esse código?:
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(getClass().getResource("VDN.xml").toString());
NodeList nl = doc.getElementsByTagName(tag);
String chave = nl.item(indice).getFirstChild().getNodeValue();