1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
public void startElement(String namespace,
String localname,
String qualname,
Attributes atts) {
FileWriter st1 = null;
BufferedWriter st2 = null;
String client;
String id;
String idSess;
System.out.println("Balise ouvrante : " +
"namespace=" + namespace +
" localname=" + localname +
" qualname=" + qualname );
if(qualname.equalsIgnoreCase("lig")) {
try{
st1 = new FileWriter("C:/FileSortie.txt");
st2 = new BufferedWriter(st1);
client = atts.getValue("cl");
id = atts.getValue("idt");
idSess = atts.getValue("sess");
System.out.println("client"+client+";"+"id"+id+";"+"idSess"+idSess
);
st2.write(client+";"+id+";"+idSess);
st2.newLine();
.................
}
} |
Partager