public ShipChassis readChassis(InputStream stream) throws IOException, JAXBException {
		log.trace("Reading ship chassis XML");

		// Need to clean invalid XML and comments before JAXB parsing

		BufferedReader in = new BufferedReader(new InputStreamReader(stream, "UTF8"));
		StringBuilder sb = new StringBuilder();
		String line;

		boolean comment = false;
		while( (line = in.readLine()) != null ) {
			line = line.replaceAll("<!--.*-->", "");
			line = line.replaceAll("<(/?)gib[0-9]*>", "<$1gib>");

			// Remove multiline comments
			if (comment && line.contains("-->"))
				comment = false;
			else if (line.contains("<!--"))
				comment = true;
			else if (!comment)
				sb.append(line).append("\n");
		}
		in.close();
		if ( sb.substring(0, BOM_UTF8.length()).equals(BOM_UTF8) )
			sb.replace(0, BOM_UTF8.length(), "");

		// XML has multiple root nodes so need to wrap.
		sb.insert(0, "<shipChassis>\n");
		sb.append("</shipChassis>\n");

		// Parse cleaned XML
		ShipChassis sch = (ShipChassis)unmarshalFromSequence( ShipChassis.class, sb.toString() );

		return sch;
	}