public static Create ( |
||
output | ||
return |
public static XmlWriter Create(TextWriter output) {
return Create(output, null);
}
XmlWriter::Create ( Stream output ) : |
|
XmlWriter::Create ( Stream output, |
|
XmlWriter::Create ( StringBuilder output ) : |
|
XmlWriter::Create ( StringBuilder output, |
|
XmlWriter::Create ( |
|
XmlWriter::Create ( |
|
XmlWriter::Create ( |
|
XmlWriter::Create ( string outputFileName ) : |
|
XmlWriter::Create ( string outputFileName, |
/// <summary> /// Encodes the default XML representation of an <see cref="Error"/> /// object to a string. /// </summary> public static string EncodeString(Error error) { StringWriter sw = new StringWriter(); #if !NET_1_0 && !NET_1_1 XmlWriterSettings settings = new XmlWriterSettings(); settings.Indent = true; settings.NewLineOnAttributes = true; settings.CheckCharacters = false; settings.OmitXmlDeclaration = true; XmlWriter writer = XmlWriter.Create(sw, settings); #else XmlTextWriter writer = new XmlTextWriter(sw); writer.Formatting = Formatting.Indented; #endif try { writer.WriteStartElement("error"); Encode(error, writer); writer.WriteEndElement(); writer.Flush(); } finally { writer.Close(); } return(sw.ToString()); }