java/alt2xml-in-properties/src/cz/frantovo/alt2xml/in/properties/Reader.java
changeset 75 ed9ec17aa67f
parent 62 968de9cc4c5b
child 107 c5a987931ef9
     1.1 --- a/java/alt2xml-in-properties/src/cz/frantovo/alt2xml/in/properties/Reader.java	Sat Sep 06 15:06:41 2014 +0200
     1.2 +++ b/java/alt2xml-in-properties/src/cz/frantovo/alt2xml/in/properties/Reader.java	Sat Sep 06 17:17:37 2014 +0200
     1.3 @@ -109,11 +109,11 @@
     1.4  		contentHandler.startDocument();
     1.5  		contentHandler.startElement(null, null, "properties", null);
     1.6  
     1.7 -		outputLineBreak();
     1.8 +		contentHandler.lineBreak();
     1.9  	}
    1.10  
    1.11  	private void outputProperty(String key, String value) throws SAXException {
    1.12 -		outputIndentation();
    1.13 +		contentHandler.indentation(1);
    1.14  
    1.15  		AttributesImpl attributes = new AttributesImpl();
    1.16  		attributes.addAttribute(null, "name", "name", "xs:string", key);
    1.17 @@ -122,7 +122,7 @@
    1.18  		contentHandler.characters(value.toCharArray(), 0, value.length());
    1.19  		contentHandler.endElement(null, null, "property");
    1.20  
    1.21 -		outputLineBreak();
    1.22 +		contentHandler.lineBreak();
    1.23  	}
    1.24  
    1.25  	private void outputProperties(Properties loadedData) throws SAXException {
    1.26 @@ -133,21 +133,9 @@
    1.27  		}
    1.28  	}
    1.29  
    1.30 -	private void outputIndentation() throws SAXException {
    1.31 -		outputText("\t");
    1.32 -	}
    1.33 -
    1.34 -	private void outputLineBreak() throws SAXException {
    1.35 -		outputText("\n");
    1.36 -	}
    1.37 -
    1.38 -	private void outputText(String text) throws SAXException {
    1.39 -		contentHandler.characters(text.toCharArray(), 0, text.length());
    1.40 -	}
    1.41 -
    1.42  	private void outputEnd() throws SAXException {
    1.43  		contentHandler.endElement(null, null, "properties");
    1.44 -		outputLineBreak();
    1.45 +		contentHandler.lineBreak();
    1.46  		contentHandler.endDocument();
    1.47  	}
    1.48  }