file-format: markup history with <shortTerm> and <longTerm>

This commit is contained in:
Jason Long 2013-07-28 15:45:54 -04:00
parent 78bddb83fe
commit 8ac2e902bc

View file

@ -1932,11 +1932,18 @@ public class Micropolis
throws XMLStreamException throws XMLStreamException
{ {
out.writeStartElement(tagName); out.writeStartElement(tagName);
for (int i = 0; i < 240; i++) out.writeStartElement("shortTerm");
for (int i = 0; i < 120; i++)
{ {
if (i != 0) { out.writeCharacters(" "); } out.writeCharacters(" " + Integer.toString(array[i]));
out.writeCharacters(Integer.toString(array[i]));
} }
out.writeEndElement(); //shortTerm
out.writeStartElement("longTerm");
for (int i = 120; i < 240; i++)
{
out.writeCharacters(" " + Integer.toString(array[i]));
}
out.writeEndElement(); //longTerm
out.writeEndElement(); out.writeEndElement();
} }