private string xmlRE(ArrayList t) { string xml = ""; xml += "<ListaErrores>\n"; for (int i = 0; i < t.Count; i++) { Errores at = (Errores)t[i]; xml += " <Error>\n"; xml += " <Valor>" + at.getLexema() + "</Valor>\n"; xml += " <Fila>" + at.getFila() + "</Fila>\n"; xml += " <Columna>" + at.getColumna() + "</Columna>\n"; xml += " </Error>\n"; } xml += "</ListaErrores>\n"; return(xml); }
private string htmlRE(ArrayList t) { string html = ""; html += "<!DOCTYPE html> \n"; html += "<html> \n"; html += "<head><title>Reporte de errores</title></head> \n"; html += "<body> \n"; html += "<h1>Listado de errores</h1> \n"; html += "<table border=\"1px\" solid #0000 border-collapse: collapse> \n"; html += "<tr> \n"; html += "<th border=\"1px\" solid #0000 border-collapse: collapse> Error</th> \n"; html += "<th border=\"1px\" solid #0000 border-collapse: collapse> Tipo</th> \n"; html += "<th border=\"1px\" solid #0000 border-collapse: collapse> Fila</th> \n"; html += "<th border=\"1px\" solid #0000 border-collapse: collapse> Columna</th> \n"; html += "</tr> \n"; for (int i = 0; i < t.Count; i++) { Errores at = (Errores)t[i]; html += "<tr> \n"; html += "<td border=\"1px\" solid #0000 border-collapse: collapse> " + at.getLexema() + "</td> \n"; html += "<td border=\"1px\" solid #0000 border-collapse: collapse> Error Lexico</td> \n"; html += "<td border=\"1px\" solid #0000 border-collapse: collapse> " + at.getFila() + "</td> \n"; html += "<td border=\"1px\" solid #0000 border-collapse: collapse> " + at.getColumna() + "</td> \n"; html += "</tr> \n"; } html += "</table> \n"; html += "</body> \n"; html += "</html> \n"; return(html); }