Rhino.Xmlimpl.XmlProcessor.ToString C# (CSharp) Method

ToString() private method

private ToString ( System node ) : string
node System
return string
		private string ToString(System.Xml.XmlNode node)
		{
			DOMSource source = new DOMSource(node);
			StringWriter writer = new StringWriter();
			StreamResult result = new StreamResult(writer);
			try
			{
				Transformer transformer = xform.NewTransformer();
				transformer.SetOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
				transformer.SetOutputProperty(OutputKeys.INDENT, "no");
				transformer.SetOutputProperty(OutputKeys.METHOD, "xml");
				transformer.Transform(source, result);
			}
			catch (TransformerConfigurationException ex)
			{
				//    TODO    How to handle these runtime errors?
				throw new Exception(ex);
			}
			catch (TransformerException ex)
			{
				//    TODO    How to handle these runtime errors?
				throw new Exception(ex);
			}
			return ToXmlNewlines(writer.ToString());
		}