// First fetch the content collection of the user-specific X Apps items
// and look for the file <app name>.xml.
ContentCollection userNode = getUserXAppContentCollection();
String nodeName = item.getAppName() + ".xml";
ContentNode appNode = userNode.getChild(nodeName);
if (appNode == null) {
appNode = userNode.createChild(nodeName, Type.RESOURCE);
}
ContentResource resource = (ContentResource)appNode;
ByteArrayOutputStream os = new ByteArrayOutputStream();