public static BoardLayout loadFromXml(InputStream xml, String id) {
		String title = "Online Staff";
		String[] lines = new String[0];
		
		try {
			DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
			DocumentBuilder builder = factory.newDocumentBuilder();
			Document doc = builder.parse(xml);
			
			NodeList rootNodes = doc.getChildNodes();
			
			for (int i = 0; i < rootNodes.getLength(); i++) {
				Node rootNode = rootNodes.item(i);
				if (!rootNode.getNodeName().equalsIgnoreCase(ROOT_ELEMENT)) {
					continue;
				}
				
				NamedNodeMap attributes = rootNode.getAttributes();
				Node idAttribute = attributes.getNamedItem(ID_ATTRIBUTE);
				
				if (idAttribute == null) {
					continue;
				}
				
				if (!idAttribute.getNodeValue().equalsIgnoreCase(id)) {
					continue;
				}
				
				NodeList childNodes = rootNode.getChildNodes();
				for (int j = 0; j < childNodes.getLength(); j++) {
					Node node = childNodes.item(j);
					
					if (node.getNodeName().equalsIgnoreCase(TITLE_ELEMENT)) {
						title = node.getTextContent();
					} else if (node.getNodeName().equalsIgnoreCase(LINE_ELEMENT)) {
						String[] tmpLines = new String[lines.length + 1];
						System.arraycopy(lines, 0, tmpLines, 0, lines.length);
						tmpLines[lines.length] = node.getTextContent();
						
						lines = tmpLines;
					}
				}
			}
			
			return new BoardLayout(title, lines);
		} catch (Exception e) {
			Logger.severe("Failed to load boardlayout " + id + ": " + e.getMessage());
		}
		
		return null;
	}