Java Reference
In-Depth Information
xmlBuffer.append(precipitation);
xmlBuffer.append(XML_START_CLOSE);
xmlBuffer.append(XML_TAG_PRECIP);
xmlBuffer.append(XML_END_CLOSE);
xmlBuffer.append(XML_NEWLINE);
}
if (forecast != null) {
xmlBuffer.append(XML_START_OPEN);
xmlBuffer.append(XML_TAG_TEXT);
xmlBuffer.append(XML_END_OPEN);
xmlBuffer.append(XML_NEWLINE);
xmlBuffer.append(XML_START_OPEN);
xmlBuffer.append(XML_TAG_WHEN);
xmlBuffer.append(XML_ATTR_WTIME);
xmlBuffer.append(XML_END_OPEN);
xmlBuffer.append(forecast);
xmlBuffer.append(XML_START_CLOSE);
xmlBuffer.append(XML_TAG_WHEN);
xmlBuffer.append(XML_END_CLOSE);
xmlBuffer.append(XML_NEWLINE);
xmlBuffer.append(XML_START_CLOSE);
xmlBuffer.append(XML_TAG_TEXT);
xmlBuffer.append(XML_END_CLOSE);
xmlBuffer.append(XML_NEWLINE);
}
xmlBuffer.append(XML_START_CLOSE);
xmlBuffer.append(XML_TAG_WEATHER);
xmlBuffer.append(XML_END_CLOSE);
xmlBuffer.append(XML_NEWLINE);
} else {
xmlBuffer.append(XML_END_EMPTYOPEN);
}
return xmlBuffer.toString();
}
public void fromXml(String xml) {
/* shown in Listing 13-9 and 13-13 */
}
}
 
Search WWH ::




Custom Search