return result;
}
protected XmlArray processChildren(List<MessagePart> parts) {
XmlArray array = new XmlArray("children");
for (MessagePart part : parts) {
XmlMap object = new XmlMap("part");
object.put("message", part.getMessage());
object.put("properties", new XmlMap("properties", part.getProps()));
List<MessagePart> children = part.getChildren();
if (children.size() > 0) {
object.put("children", processChildren(part.getChildren()));
}
array.put(object);
}
return array;
}