XmlWriter Class
NuGet: GHIElectronics.TinyCLR.System.Xml
Assembly: GHIElectronics.TinyCLR.System.Xml
Namespace: System.Xml
Forward-only XML writer. Same surface as .NET's System.Xml.XmlWriter.
public abstract class XmlWriter : IDisposable
Methods
WriteStartDocument()
public abstract void WriteStartDocument()
Writes the XML declaration.
WriteStartDocument(bool standalone)
public abstract void WriteStartDocument(bool standalone)
Writes the XML declaration with the specified standalone attribute.
WriteEndDocument()
public abstract void WriteEndDocument()
Closes any open elements and the document.
WriteStartElement(string localName)
public abstract void WriteStartElement(string localName)
Writes a start tag with the specified local name.
WriteStartElement(string localName, string ns)
public abstract void WriteStartElement(string localName, string ns)
Writes a start tag with the specified local name and namespace URI.
WriteStartElement(string prefix, string localName, string ns)
public abstract void WriteStartElement(string prefix, string localName, string ns)
Writes a start tag with the specified prefix, local name, and namespace URI.
WriteEndElement()
public abstract void WriteEndElement()
Closes the most recently opened element.
WriteFullEndElement()
public abstract void WriteFullEndElement()
Closes the most recently opened element, always writing a full end tag.
WriteAttributeString(string localName, string value)
public abstract void WriteAttributeString(string localName, string value)
Writes an attribute with the specified local name and value.
WriteAttributeString(string localName, string ns, string value)
public abstract void WriteAttributeString(string localName, string ns, string value)
Writes an attribute with the specified local name, namespace URI, and value.
WriteAttributeString(string prefix, string localName, string ns, string value)
public abstract void WriteAttributeString(string prefix, string localName, string ns, string value)
Writes an attribute with the specified prefix, local name, namespace URI, and value.
WriteString(string text)
public abstract void WriteString(string text)
Writes the specified text content.
WriteRaw(string data)
public abstract void WriteRaw(string data)
Writes the specified markup verbatim without escaping.
WriteCData(string text)
public abstract void WriteCData(string text)
Writes the specified text inside a CDATA section.
WriteComment(string text)
public abstract void WriteComment(string text)
Writes the specified text inside a comment.
WriteProcessingInstruction(string name, string text)
public abstract void WriteProcessingInstruction(string name, string text)
Writes a processing instruction with the specified name and text.
Flush()
public abstract void Flush()
Flushes buffered output to the underlying stream.
Close()
public abstract void Close()
Closes the writer and flushes any buffered output.
LookupPrefix(string ns)
public abstract string LookupPrefix(string ns)
Returns the closest prefix in scope for the specified namespace URI.
Returns string
WriteElementString(string localName, string value)
public void WriteElementString(string localName, string value)
Writes an element with the specified local name and text content.
Dispose()
public virtual void Dispose()
Releases the resources used by the writer.
Create(Stream output)
public static XmlWriter Create(Stream output)
Creates a new writer over the specified stream.
Returns XmlWriter