Skip to content

Commit

Permalink
order reversed and epoch time as attribute and otherwise human readab…
Browse files Browse the repository at this point in the history
…le date
  • Loading branch information
michaelwechner committed Nov 9, 2012
1 parent 527f4d6 commit 023ea0f
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -121,7 +121,8 @@ protected InputStream getContentXML(String viewId) throws Exception {
break;
}

for(Node node : nodes) {
for(int i = nodes.length - 1; i >= 0; i++) {
Node node = nodes[i];
Element res_node = doc.createElementNS(NAMESPACE, "result");
resultsEl.appendChild(res_node);

Expand All @@ -134,7 +135,8 @@ protected InputStream getContentXML(String viewId) throws Exception {
res_node.appendChild(res_name);

Element res_time = doc.createElementNS(NAMESPACE, "last-modified");
res_time.appendChild(doc.createTextNode(Long.toString(node.getLastModified())));
res_time.setAttribute("epoch", Long.toString(node.getLastModified()));
res_time.appendChild(doc.createTextNode(new java.util.Date(node.getLastModified()).toString()));
res_node.appendChild(res_time);
}
}
Expand Down

0 comments on commit 023ea0f

Please sign in to comment.