Cambio nombre variable
This commit is contained in:
parent
185864789c
commit
dba76f1136
@ -89,20 +89,20 @@ public class GestorInstitutoXML {
|
||||
Document documento = obtenerDocumentDeFichero();
|
||||
NodeList listaNodosModulo = documento.getElementsByTagName("modulo");
|
||||
for (int temp = 0; temp < listaNodosModulo.getLength(); temp++) {
|
||||
Node nodoModelo = listaNodosModulo.item(temp);
|
||||
if (nodoModelo.getNodeType() == Node.ELEMENT_NODE) {
|
||||
Element modelo = (Element) nodoModelo;
|
||||
Node nodoModulo = listaNodosModulo.item(temp);
|
||||
if (nodoModulo.getNodeType() == Node.ELEMENT_NODE) {
|
||||
Element modulo = (Element) nodoModulo;
|
||||
|
||||
// Obtener texto del Título
|
||||
String titulo = modelo.getElementsByTagName("titulo").item(0).getTextContent();
|
||||
String titulo = modulo.getElementsByTagName("titulo").item(0).getTextContent();
|
||||
if (titulo.startsWith("Programa")) {
|
||||
|
||||
// Obtener atributos id y referencia
|
||||
String id = modelo.getAttribute("id");
|
||||
String referencia = modelo.getAttribute("ref");
|
||||
String id = modulo.getAttribute("id");
|
||||
String referencia = modulo.getAttribute("ref");
|
||||
|
||||
// Obtener Número de horas
|
||||
String numerohoras = modelo.getElementsByTagName("numerohoras").item(0).getTextContent();
|
||||
String numerohoras = modulo.getElementsByTagName("numerohoras").item(0).getTextContent();
|
||||
|
||||
System.out.println("Modelo: - Id: " + id + ", Referencia: " + referencia + ", Título: " + titulo
|
||||
+ ", Número de horas: " + numerohoras);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user