All pastes #913100 Raw Edit

Zeug

public text v1 · immutable
·published 2008-02-21 20:54 UTC
rendered paste body
try {
    			XMLOutputFactory factory = XMLOutputFactory.newInstance();
    			XMLStreamWriter writer = factory.createXMLStreamWriter( new FileOutputStream( "E:\\playeronline.xml" ) );
    			
    			writer.writeStartDocument();
    			
    			writer.writeStartElement("players");
    			
	        	while(rs.next()) {
	        		writer.writeStartElement("player");
	        		
	        		String guid = rs.getString("guid");
	        		writer.writeStartElement("guid");
	        		writer.
	        		writer.writeEndElement();
	        		
	        		writer.writeEndElement();	        		

	        	}
	        	
	        	writer.writeEndElement();
	        	writer.writeEndDocument();
	        	writer.close();
	        	
	        } catch (FileNotFoundException e) {
    			e.printStackTrace();
    		} catch (XMLStreamException e) {
    			e.printStackTrace();
    		}