src/openSourceC.DotNetLibrary.Core/XmlSerialize.cs
/// <summary>
///		Create a default <see cref="XmlWriterSettings"/> object for formatting the XML output.
/// </summary>
/// <param name="expandForReadability"><b>true</b> to expand the XML with line feeds and
///		spacing, <b>false</b> to remove all readability formatting.</param>
/// <returns>An <see cref="XmlWriterSettings"/> object.</returns>
Create a default  object for formatting the XML output.
Create a default object for formatting the XML output .
private static XmlWriterSettings GetNewXmlWriterSettingsObject(bool expandForReadability)
		{
			XmlWriterSettings xmlWriterSettings = new XmlWriterSettings
			{
				ConformanceLevel = ConformanceLevel.Document,
				OmitXmlDeclaration = true,
				Encoding = Encoding.UTF8,
				NamespaceHandling = NamespaceHandling.OmitDuplicates,
			};
			if (expandForReadability)
			{
				xmlWriterSettings.Indent = true;
				xmlWriterSettings.IndentChars = "    ";
			}
			return xmlWriterSettings;
		}
private static XmlWriterSettings GetNewXmlWriterSettingsObject ( bool expandForReadability ) { XmlWriterSettings xmlWriterSettings = new XmlWriterSettings { ConformanceLevel = ConformanceLevel . Document , OmitXmlDeclaration = true , Encoding = Encoding . UTF8 , NamespaceHandling = NamespaceHandling . OmitDuplicates , } ; if ( expandForReadability ) { xmlWriterSettings . Indent = true ; xmlWriterSettings . IndentChars = " " ; } return xmlWriterSettings ; }
Create a default  object for formatting the XML output.
Create a default object for formatting the XML output .
//xmlWriterSettings.NewLineOnAttributes = true;
None
expandForReadability
bool
None