} catch (Exception e) {
} catch (TransformerException e) { throw createException(e, FormatterMessages.getString("CodingStyleConfigurationBlock.error.serializing_xml.message")); } catch (ParserConfigurationException e) {
	private static void writeProfilesToStream(Collection profiles, OutputStream stream) throws CoreException {		try {			final DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();			final DocumentBuilder builder= factory.newDocumentBuilder();					final Document document= builder.newDocument();						final Element rootElement = document.createElement(XML_NODE_ROOT);			rootElement.setAttribute(XML_ATTRIBUTE_VERSION, Integer.toString(ProfileVersioner.CURRENT_VERSION));			document.appendChild(rootElement);						for(final Iterator iter= profiles.iterator(); iter.hasNext();) {				final Profile profile= (Profile)iter.next();				if (profile instanceof CustomProfile) {					final Element profileElement= createProfileElement((CustomProfile)profile, document);					rootElement.appendChild(profileElement);				}			}			Transformer transformer=TransformerFactory.newInstance().newTransformer();			transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$			transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //$NON-NLS-1$			transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$			transformer.transform(new DOMSource(document), new StreamResult(stream));		} catch (Exception e) {			throw createException(e, FormatterMessages.getString("CodingStyleConfigurationBlock.error.serializing_xml.message"));  //$NON-NLS-1$		}	}