[transform] Code optimization for Java17: instanceof matching and multiline strings (#15483)

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
Holger Friedrich 2023-08-24 06:41:36 +02:00 committed by GitHub
parent db651f9e92
commit 6e49c6e6ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 111 additions and 107 deletions

View File

@ -161,41 +161,40 @@ public class Bin2Json {
final String fieldName = field.getFieldName() == null ? "nonamed" : field.getFieldName(); final String fieldName = field.getFieldName() == null ? "nonamed" : field.getFieldName();
if (field instanceof JBBPAbstractArrayField) { if (field instanceof JBBPAbstractArrayField) {
final JsonArray jsonArray = new JsonArray(); final JsonArray jsonArray = new JsonArray();
if (field instanceof JBBPFieldArrayBit) { if (field instanceof JBBPFieldArrayBit bit) {
for (final byte b : ((JBBPFieldArrayBit) field).getArray()) { for (final byte b : bit.getArray()) {
jsonArray.add(new JsonPrimitive(b)); jsonArray.add(new JsonPrimitive(b));
} }
} else if (field instanceof JBBPFieldArrayBoolean) { } else if (field instanceof JBBPFieldArrayBoolean boolean1) {
for (final boolean b : ((JBBPFieldArrayBoolean) field).getArray()) { for (final boolean b : boolean1.getArray()) {
jsonArray.add(new JsonPrimitive(b)); jsonArray.add(new JsonPrimitive(b));
} }
} else if (field instanceof JBBPFieldArrayByte) { } else if (field instanceof JBBPFieldArrayByte byte1) {
for (final byte b : ((JBBPFieldArrayByte) field).getArray()) { for (final byte b : byte1.getArray()) {
jsonArray.add(new JsonPrimitive(b)); jsonArray.add(new JsonPrimitive(b));
} }
} else if (field instanceof JBBPFieldArrayInt) { } else if (field instanceof JBBPFieldArrayInt int1) {
for (final int b : ((JBBPFieldArrayInt) field).getArray()) { for (final int b : int1.getArray()) {
jsonArray.add(new JsonPrimitive(b)); jsonArray.add(new JsonPrimitive(b));
} }
} else if (field instanceof JBBPFieldArrayLong) { } else if (field instanceof JBBPFieldArrayLong long1) {
for (final long b : ((JBBPFieldArrayLong) field).getArray()) { for (final long b : long1.getArray()) {
jsonArray.add(new JsonPrimitive(b)); jsonArray.add(new JsonPrimitive(b));
} }
} else if (field instanceof JBBPFieldArrayShort) { } else if (field instanceof JBBPFieldArrayShort short1) {
for (final short b : ((JBBPFieldArrayShort) field).getArray()) { for (final short b : short1.getArray()) {
jsonArray.add(new JsonPrimitive(b)); jsonArray.add(new JsonPrimitive(b));
} }
} else if (field instanceof JBBPFieldArrayStruct) { } else if (field instanceof JBBPFieldArrayStruct array) {
final JBBPFieldArrayStruct array = (JBBPFieldArrayStruct) field;
for (int i = 0; i < array.size(); i++) { for (int i = 0; i < array.size(); i++) {
jsonArray.add(convertToJSon(new JsonObject(), array.getElementAt(i))); jsonArray.add(convertToJSon(new JsonObject(), array.getElementAt(i)));
} }
} else if (field instanceof JBBPFieldArrayUByte) { } else if (field instanceof JBBPFieldArrayUByte byte1) {
for (final byte b : ((JBBPFieldArrayUByte) field).getArray()) { for (final byte b : byte1.getArray()) {
jsonArray.add(new JsonPrimitive(b & 0xFF)); jsonArray.add(new JsonPrimitive(b & 0xFF));
} }
} else if (field instanceof JBBPFieldArrayUShort) { } else if (field instanceof JBBPFieldArrayUShort short1) {
for (final short b : ((JBBPFieldArrayUShort) field).getArray()) { for (final short b : short1.getArray()) {
jsonArray.add(new JsonPrimitive(b & 0xFFFF)); jsonArray.add(new JsonPrimitive(b & 0xFFFF));
} }
} else { } else {
@ -203,20 +202,19 @@ public class Bin2Json {
} }
jsn.add(fieldName, jsonArray); jsn.add(fieldName, jsonArray);
} else { } else {
if (field instanceof JBBPFieldBit) { if (field instanceof JBBPFieldBit bit) {
jsn.addProperty(fieldName, ((JBBPFieldBit) field).getAsInt()); jsn.addProperty(fieldName, bit.getAsInt());
} else if (field instanceof JBBPFieldBoolean) { } else if (field instanceof JBBPFieldBoolean boolean1) {
jsn.addProperty(fieldName, ((JBBPFieldBoolean) field).getAsBool()); jsn.addProperty(fieldName, boolean1.getAsBool());
} else if (field instanceof JBBPFieldByte) { } else if (field instanceof JBBPFieldByte byte1) {
jsn.addProperty(fieldName, ((JBBPFieldByte) field).getAsInt()); jsn.addProperty(fieldName, byte1.getAsInt());
} else if (field instanceof JBBPFieldInt) { } else if (field instanceof JBBPFieldInt int1) {
jsn.addProperty(fieldName, ((JBBPFieldInt) field).getAsInt()); jsn.addProperty(fieldName, int1.getAsInt());
} else if (field instanceof JBBPFieldLong) { } else if (field instanceof JBBPFieldLong long1) {
jsn.addProperty(fieldName, ((JBBPFieldLong) field).getAsLong()); jsn.addProperty(fieldName, long1.getAsLong());
} else if (field instanceof JBBPFieldShort) { } else if (field instanceof JBBPFieldShort short1) {
jsn.addProperty(fieldName, ((JBBPFieldShort) field).getAsInt()); jsn.addProperty(fieldName, short1.getAsInt());
} else if (field instanceof JBBPFieldStruct) { } else if (field instanceof JBBPFieldStruct struct) {
final JBBPFieldStruct struct = (JBBPFieldStruct) field;
final JsonObject obj = new JsonObject(); final JsonObject obj = new JsonObject();
for (final JBBPAbstractField f : struct.getArray()) { for (final JBBPAbstractField f : struct.getArray()) {
convertToJSon(obj, f); convertToJSon(obj, f);
@ -226,10 +224,10 @@ public class Bin2Json {
} else { } else {
jsn.add(fieldName, obj); jsn.add(fieldName, obj);
} }
} else if (field instanceof JBBPFieldUByte) { } else if (field instanceof JBBPFieldUByte byte1) {
jsn.addProperty(fieldName, ((JBBPFieldUByte) field).getAsInt()); jsn.addProperty(fieldName, byte1.getAsInt());
} else if (field instanceof JBBPFieldUShort) { } else if (field instanceof JBBPFieldUShort short1) {
jsn.addProperty(fieldName, ((JBBPFieldUShort) field).getAsInt()); jsn.addProperty(fieldName, short1.getAsInt());
} else { } else {
throw new ConversionException(String.format("Unexpected field '%s'", field)); throw new ConversionException(String.format("Unexpected field '%s'", field));
} }

View File

@ -64,9 +64,9 @@ public class ExecTransformationProfile implements StateProfile {
if (paramSource == null) { if (paramSource == null) {
paramSource = "%s"; paramSource = "%s";
} }
if (paramFunction instanceof String && paramSource instanceof String) { if (paramFunction instanceof String pFunction && paramSource instanceof String pFormat) {
function = (String) paramFunction; function = pFunction;
sourceFormat = (String) paramSource; sourceFormat = pFormat;
} else { } else {
logger.error("Parameter '{}' and '{}' have to be Strings. Profile will be inactive.", FUNCTION_PARAM, logger.error("Parameter '{}' and '{}' have to be Strings. Profile will be inactive.", FUNCTION_PARAM,
SOURCE_FORMAT_PARAM); SOURCE_FORMAT_PARAM);

View File

@ -65,9 +65,9 @@ public class JinjaTransformationProfile implements StateProfile {
if (paramSource == null) { if (paramSource == null) {
paramSource = "%s"; paramSource = "%s";
} }
if (paramFunction instanceof String && paramSource instanceof String) { if (paramFunction instanceof String pFunction && paramSource instanceof String pFormat) {
function = (String) paramFunction; function = pFunction;
sourceFormat = (String) paramSource; sourceFormat = pFormat;
} else { } else {
logger.error("Parameter '{}' and '{}' have to be Strings. Profile will be inactive.", FUNCTION_PARAM, logger.error("Parameter '{}' and '{}' have to be Strings. Profile will be inactive.", FUNCTION_PARAM,
SOURCE_FORMAT_PARAM); SOURCE_FORMAT_PARAM);

View File

@ -68,8 +68,8 @@ public class JSonPathTransformationService implements TransformationService {
logger.debug("transformation resulted in '{}'", transformationResult); logger.debug("transformation resulted in '{}'", transformationResult);
if (transformationResult == null) { if (transformationResult == null) {
return null; return null;
} else if (transformationResult instanceof List) { } else if (transformationResult instanceof List list) {
return flattenList((List<?>) transformationResult); return flattenList(list);
} else { } else {
return transformationResult.toString(); return transformationResult.toString();
} }

View File

@ -66,9 +66,9 @@ public class JSonPathTransformationProfile implements StateProfile {
if (paramSource == null) { if (paramSource == null) {
paramSource = "%s"; paramSource = "%s";
} }
if (paramFunction instanceof String && paramSource instanceof String) { if (paramFunction instanceof String pFunction && paramSource instanceof String pFormat) {
function = (String) paramFunction; function = pFunction;
sourceFormat = (String) paramSource; sourceFormat = pFormat;
} else { } else {
logger.error("Parameter '{}' and '{}' have to be Strings. Profile will be inactive.", FUNCTION_PARAM, logger.error("Parameter '{}' and '{}' have to be Strings. Profile will be inactive.", FUNCTION_PARAM,
SOURCE_FORMAT_PARAM); SOURCE_FORMAT_PARAM);

View File

@ -64,9 +64,9 @@ public class MapTransformationProfile implements StateProfile {
if (paramSource == null) { if (paramSource == null) {
paramSource = "%s"; paramSource = "%s";
} }
if (paramFunction instanceof String && paramSource instanceof String) { if (paramFunction instanceof String pFunction && paramSource instanceof String pFormat) {
function = (String) paramFunction; function = pFunction;
sourceFormat = (String) paramSource; sourceFormat = pFormat;
} else { } else {
logger.error("Parameter '{}' and '{}' have to be Strings. Profile will be inactive.", FUNCTION_PARAM, logger.error("Parameter '{}' and '{}' have to be Strings. Profile will be inactive.", FUNCTION_PARAM,
SOURCE_FORMAT_PARAM); SOURCE_FORMAT_PARAM);

View File

@ -65,9 +65,9 @@ public class RegexTransformationProfile implements StateProfile {
if (paramSource == null) { if (paramSource == null) {
paramSource = "%s"; paramSource = "%s";
} }
if (paramFunction instanceof String && paramSource instanceof String) { if (paramFunction instanceof String pFunction && paramSource instanceof String pFormat) {
function = (String) paramFunction; function = pFunction;
sourceFormat = (String) paramSource; sourceFormat = pFormat;
} else { } else {
logger.error("Parameter '{}' and '{}' have to be Strings. Profile will be inactive.", FUNCTION_PARAM, logger.error("Parameter '{}' and '{}' have to be Strings. Profile will be inactive.", FUNCTION_PARAM,
SOURCE_FORMAT_PARAM); SOURCE_FORMAT_PARAM);

View File

@ -17,19 +17,21 @@ package org.openhab.transform.regex.internal;
*/ */
public abstract class AbstractTransformationServiceTest { public abstract class AbstractTransformationServiceTest {
protected String source = "<?xml version=\"1.0\"?><xml_api_reply version=\"1\"><weather module_id=\"0\"" protected String source = """
+ " tab_id=\"0\" mobile_row=\"0\" mobile_zipped=\"1\" row=\"0\" section=\"0\" ><forecast_information>" <?xml version="1.0"?><xml_api_reply version="1"><weather module_id="0"\
+ "<city data=\"Krefeld, North Rhine-Westphalia\"/><postal_code data=\"Krefeld Germany\"/>" tab_id="0" mobile_row="0" mobile_zipped="1" row="0" section="0" ><forecast_information>\
+ "<latitude_e6 data=\"\"/><longitude_e6 data=\"\"/><forecast_date data=\"2011-03-01\"/>" <city data="Krefeld, North Rhine-Westphalia"/><postal_code data="Krefeld Germany"/>\
+ "<current_date_time data=\"2011-03-01 15:20:00 +0000\"/><unit_system data=\"SI\"/></forecast_information>" <latitude_e6 data=""/><longitude_e6 data=""/><forecast_date data="2011-03-01"/>\
+ "<current_conditions><condition data=\"Meistens bew<65>lkt\"/><temp_f data=\"46\"/><temp_c data=\"8\"/>" <current_date_time data="2011-03-01 15:20:00 +0000"/><unit_system data="SI"/></forecast_information>\
+ "<humidity data=\"Feuchtigkeit: 66 %\"/><icon data=\"/ig/images/weather/mostly_cloudy.gif\"/>" <current_conditions><condition data="Meistens bew<65>lkt"/><temp_f data="46"/><temp_c data="8"/>\
+ "<wind_condition data=\"Wind: N mit 26 km/h\"/></current_conditions><forecast_conditions><day_of_week data=\"Di.\"/>" <humidity data="Feuchtigkeit: 66 %"/><icon data="/ig/images/weather/mostly_cloudy.gif"/>\
+ "<low data=\"-1\"/><high data=\"6\"/><icon data=\"/ig/images/weather/sunny.gif\"/><condition data=\"Klar\"/>" <wind_condition data="Wind: N mit 26 km/h"/></current_conditions><forecast_conditions><day_of_week data="Di."/>\
+ "</forecast_conditions><forecast_conditions><day_of_week data=\"Mi.\"/><low data=\"-1\"/><high data=\"8\"/>" <low data="-1"/><high data="6"/><icon data="/ig/images/weather/sunny.gif"/><condition data="Klar"/>\
+ "<icon data=\"/ig/images/weather/sunny.gif\"/><condition data=\"Klar\"/></forecast_conditions><forecast_conditions>" </forecast_conditions><forecast_conditions><day_of_week data="Mi."/><low data="-1"/><high data="8"/>\
+ "<day_of_week data=\"Do.\"/><low data=\"-1\"/><high data=\"8\"/><icon data=\"/ig/images/weather/sunny.gif\"/>" <icon data="/ig/images/weather/sunny.gif"/><condition data="Klar"/></forecast_conditions><forecast_conditions>\
+ "<condition data=\"Klar\"/></forecast_conditions><forecast_conditions><day_of_week data=\"Fr.\"/><low data=\"0\"/>" <day_of_week data="Do."/><low data="-1"/><high data="8"/><icon data="/ig/images/weather/sunny.gif"/>\
+ "<high data=\"8\"/><icon data=\"/ig/images/weather/sunny.gif\"/><condition data=\"Klar\"/></forecast_conditions>" <condition data="Klar"/></forecast_conditions><forecast_conditions><day_of_week data="Fr."/><low data="0"/>\
+ "</weather></xml_api_reply>"; <high data="8"/><icon data="/ig/images/weather/sunny.gif"/><condition data="Klar"/></forecast_conditions>\
</weather></xml_api_reply>\
""";
} }

View File

@ -64,9 +64,9 @@ public class ScaleTransformationProfile implements StateProfile {
if (paramSource == null) { if (paramSource == null) {
paramSource = "%s"; paramSource = "%s";
} }
if (paramFunction instanceof String && paramSource instanceof String) { if (paramFunction instanceof String pFunction && paramSource instanceof String pFormat) {
function = (String) paramFunction; function = pFunction;
sourceFormat = (String) paramSource; sourceFormat = pFormat;
} else { } else {
logger.error("Parameter '{}' and '{}' have to be Strings. Profile will be inactive.", FUNCTION_PARAM, logger.error("Parameter '{}' and '{}' have to be Strings. Profile will be inactive.", FUNCTION_PARAM,
SOURCE_FORMAT_PARAM); SOURCE_FORMAT_PARAM);

View File

@ -65,9 +65,9 @@ public class XPathTransformationProfile implements StateProfile {
if (paramSource == null) { if (paramSource == null) {
paramSource = "%s"; paramSource = "%s";
} }
if (paramFunction instanceof String && paramSource instanceof String) { if (paramFunction instanceof String pFunction && paramSource instanceof String pFormat) {
function = (String) paramFunction; function = pFunction;
sourceFormat = (String) paramSource; sourceFormat = pFormat;
} else { } else {
logger.error("Parameter '{}' and '{}' have to be Strings. Profile will be inactive.", FUNCTION_PARAM, logger.error("Parameter '{}' and '{}' have to be Strings. Profile will be inactive.", FUNCTION_PARAM,
SOURCE_FORMAT_PARAM); SOURCE_FORMAT_PARAM);

View File

@ -17,19 +17,21 @@ package org.openhab.transform.xpath.internal;
*/ */
public abstract class AbstractTransformationServiceTest { public abstract class AbstractTransformationServiceTest {
protected String source = "<?xml version=\"1.0\"?><xml_api_reply version=\"1\"><weather module_id=\"0\"" protected String source = """
+ " tab_id=\"0\" mobile_row=\"0\" mobile_zipped=\"1\" row=\"0\" section=\"0\" ><forecast_information>" <?xml version="1.0"?><xml_api_reply version="1"><weather module_id="0"\
+ "<city data=\"Krefeld, North Rhine-Westphalia\"/><postal_code data=\"Krefeld Germany\"/>" tab_id="0" mobile_row="0" mobile_zipped="1" row="0" section="0" ><forecast_information>\
+ "<latitude_e6 data=\"\"/><longitude_e6 data=\"\"/><forecast_date data=\"2011-03-01\"/>" <city data="Krefeld, North Rhine-Westphalia"/><postal_code data="Krefeld Germany"/>\
+ "<current_date_time data=\"2011-03-01 15:20:00 +0000\"/><unit_system data=\"SI\"/></forecast_information>" <latitude_e6 data=""/><longitude_e6 data=""/><forecast_date data="2011-03-01"/>\
+ "<current_conditions><condition data=\"Meistens bew<65>lkt\"/><temp_f data=\"46\"/><temp_c data=\"8\"/>" <current_date_time data="2011-03-01 15:20:00 +0000"/><unit_system data="SI"/></forecast_information>\
+ "<humidity data=\"Feuchtigkeit: 66 %\"/><icon data=\"/ig/images/weather/mostly_cloudy.gif\"/>" <current_conditions><condition data="Meistens bew<65>lkt"/><temp_f data="46"/><temp_c data="8"/>\
+ "<wind_condition data=\"Wind: N mit 26 km/h\"/></current_conditions><forecast_conditions><day_of_week data=\"Di.\"/>" <humidity data="Feuchtigkeit: 66 %"/><icon data="/ig/images/weather/mostly_cloudy.gif"/>\
+ "<low data=\"-1\"/><high data=\"6\"/><icon data=\"/ig/images/weather/sunny.gif\"/><condition data=\"Klar\"/>" <wind_condition data="Wind: N mit 26 km/h"/></current_conditions><forecast_conditions><day_of_week data="Di."/>\
+ "</forecast_conditions><forecast_conditions><day_of_week data=\"Mi.\"/><low data=\"-1\"/><high data=\"8\"/>" <low data="-1"/><high data="6"/><icon data="/ig/images/weather/sunny.gif"/><condition data="Klar"/>\
+ "<icon data=\"/ig/images/weather/sunny.gif\"/><condition data=\"Klar\"/></forecast_conditions><forecast_conditions>" </forecast_conditions><forecast_conditions><day_of_week data="Mi."/><low data="-1"/><high data="8"/>\
+ "<day_of_week data=\"Do.\"/><low data=\"-1\"/><high data=\"8\"/><icon data=\"/ig/images/weather/sunny.gif\"/>" <icon data="/ig/images/weather/sunny.gif"/><condition data="Klar"/></forecast_conditions><forecast_conditions>\
+ "<condition data=\"Klar\"/></forecast_conditions><forecast_conditions><day_of_week data=\"Fr.\"/><low data=\"0\"/>" <day_of_week data="Do."/><low data="-1"/><high data="8"/><icon data="/ig/images/weather/sunny.gif"/>\
+ "<high data=\"8\"/><icon data=\"/ig/images/weather/sunny.gif\"/><condition data=\"Klar\"/></forecast_conditions>" <condition data="Klar"/></forecast_conditions><forecast_conditions><day_of_week data="Fr."/><low data="0"/>\
+ "</weather></xml_api_reply>"; <high data="8"/><icon data="/ig/images/weather/sunny.gif"/><condition data="Klar"/></forecast_conditions>\
</weather></xml_api_reply>\
""";
} }

View File

@ -65,9 +65,9 @@ public class XSLTTransformationProfile implements StateProfile {
if (paramSource == null) { if (paramSource == null) {
paramSource = "%s"; paramSource = "%s";
} }
if (paramFunction instanceof String && paramSource instanceof String) { if (paramFunction instanceof String pFunction && paramSource instanceof String pFormat) {
function = (String) paramFunction; function = pFunction;
sourceFormat = (String) paramSource; sourceFormat = pFormat;
} else { } else {
logger.warn("Parameter '{}' and '{}' have to be Strings. Profile will be inactive.", FUNCTION_PARAM, logger.warn("Parameter '{}' and '{}' have to be Strings. Profile will be inactive.", FUNCTION_PARAM,
SOURCE_FORMAT_PARAM); SOURCE_FORMAT_PARAM);

View File

@ -17,19 +17,21 @@ package org.openhab.transform.xslt.internal;
*/ */
public abstract class AbstractTransformationServiceTest { public abstract class AbstractTransformationServiceTest {
protected String source = "<?xml version=\"1.0\"?><xml_api_reply version=\"1\"><weather module_id=\"0\"" protected String source = """
+ " tab_id=\"0\" mobile_row=\"0\" mobile_zipped=\"1\" row=\"0\" section=\"0\" ><forecast_information>" <?xml version="1.0"?><xml_api_reply version="1"><weather module_id="0"\
+ "<city data=\"Krefeld, North Rhine-Westphalia\"/><postal_code data=\"Krefeld Germany\"/>" tab_id="0" mobile_row="0" mobile_zipped="1" row="0" section="0" ><forecast_information>\
+ "<latitude_e6 data=\"\"/><longitude_e6 data=\"\"/><forecast_date data=\"2011-03-01\"/>" <city data="Krefeld, North Rhine-Westphalia"/><postal_code data="Krefeld Germany"/>\
+ "<current_date_time data=\"2011-03-01 15:20:00 +0000\"/><unit_system data=\"SI\"/></forecast_information>" <latitude_e6 data=""/><longitude_e6 data=""/><forecast_date data="2011-03-01"/>\
+ "<current_conditions><condition data=\"Meistens bew<65>lkt\"/><temp_f data=\"46\"/><temp_c data=\"8\"/>" <current_date_time data="2011-03-01 15:20:00 +0000"/><unit_system data="SI"/></forecast_information>\
+ "<humidity data=\"Feuchtigkeit: 66 %\"/><icon data=\"/ig/images/weather/mostly_cloudy.gif\"/>" <current_conditions><condition data="Meistens bew<65>lkt"/><temp_f data="46"/><temp_c data="8"/>\
+ "<wind_condition data=\"Wind: N mit 26 km/h\"/></current_conditions><forecast_conditions><day_of_week data=\"Di.\"/>" <humidity data="Feuchtigkeit: 66 %"/><icon data="/ig/images/weather/mostly_cloudy.gif"/>\
+ "<low data=\"-1\"/><high data=\"6\"/><icon data=\"/ig/images/weather/sunny.gif\"/><condition data=\"Klar\"/>" <wind_condition data="Wind: N mit 26 km/h"/></current_conditions><forecast_conditions><day_of_week data="Di."/>\
+ "</forecast_conditions><forecast_conditions><day_of_week data=\"Mi.\"/><low data=\"-1\"/><high data=\"8\"/>" <low data="-1"/><high data="6"/><icon data="/ig/images/weather/sunny.gif"/><condition data="Klar"/>\
+ "<icon data=\"/ig/images/weather/sunny.gif\"/><condition data=\"Klar\"/></forecast_conditions><forecast_conditions>" </forecast_conditions><forecast_conditions><day_of_week data="Mi."/><low data="-1"/><high data="8"/>\
+ "<day_of_week data=\"Do.\"/><low data=\"-1\"/><high data=\"8\"/><icon data=\"/ig/images/weather/sunny.gif\"/>" <icon data="/ig/images/weather/sunny.gif"/><condition data="Klar"/></forecast_conditions><forecast_conditions>\
+ "<condition data=\"Klar\"/></forecast_conditions><forecast_conditions><day_of_week data=\"Fr.\"/><low data=\"0\"/>" <day_of_week data="Do."/><low data="-1"/><high data="8"/><icon data="/ig/images/weather/sunny.gif"/>\
+ "<high data=\"8\"/><icon data=\"/ig/images/weather/sunny.gif\"/><condition data=\"Klar\"/></forecast_conditions>" <condition data="Klar"/></forecast_conditions><forecast_conditions><day_of_week data="Fr."/><low data="0"/>\
+ "</weather></xml_api_reply>"; <high data="8"/><icon data="/ig/images/weather/sunny.gif"/><condition data="Klar"/></forecast_conditions>\
</weather></xml_api_reply>\
""";
} }