XmlWriterSettings.ConformanceLevel Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets or sets the level of conformance which the XmlWriter complies with.
Assembly: System.Xml (in System.Xml.dll)
Property Value
Type: System.Xml.ConformanceLevelOne of the ConformanceLevel values. The default is ConformanceLevel.Document.
Dim settings As New XmlWriterSettings()
settings.OmitXmlDeclaration = True
settings.ConformanceLevel = ConformanceLevel.Fragment
settings.CloseOutput = False
' Create the XmlWriter object and write some content.
Dim strm As New MemoryStream()
Using writer As XmlWriter = XmlWriter.Create(strm, settings)
writer.WriteElementString("orderID", "1-456-ab")
writer.WriteElementString("orderID", "2-36-00a")
writer.Flush()
End Using
Show: