XmlWriter | System.Xml (system.xml.dll) CF 1.0, ECMA 1.0 abstract class |
public abstract class XmlWriter {
// Protected Constructors
protected XmlWriter( );
// Public Instance Properties
public abstract WriteState WriteState{get; }
public abstract string XmlLang{get; }
public abstract XmlSpace XmlSpace{get; }
// Public Instance Methods
public abstract void Close( );
public abstract void Flush( );
public abstract string LookupPrefix( string ns);
public virtual void WriteAttributes( XmlReader reader, bool defattr);
public void WriteAttributeString( string localName, string value);
public void WriteAttributeString( string localName, string ns, string value);
public void WriteAttributeString( string prefix, string localName, string ns, string value);
public abstract void WriteBase64( byte[ ] buffer, int index, int count);
public abstract void WriteBinHex( byte[ ] buffer, int index, int count);
public abstract void WriteCData( string text);
public abstract void WriteCharEntity( char ch);
public abstract void WriteChars( char[ ] buffer, int index, int count);
public abstract void WriteComment( string text);
public abstract void WriteDocType( string name, string pubid, string sysid, string subset);
public void WriteElementString( string localName, string value);
public void WriteElementString( string localName, string ns, string value);
public abstract void WriteEndAttribute( );
public abstract void WriteEndDocument( );
public abstract void WriteEndElement( );
public abstract void WriteEntityRef( string name);
public abstract void WriteFullEndElement( );
public abstract void WriteName( string name);
public abstract void WriteNmToken( string name);
public virtual void WriteNode( XmlReader reader, bool defattr);
public abstract void WriteProcessingInstruction( string name, string text);
public abstract void WriteQualifiedName( string localName, string ns);
public abstract void WriteRaw( char[ ] buffer, int index, int count);
public abstract void WriteRaw( string data);
public void WriteStartAttribute( string localName, string ns);
public abstract void WriteStartAttribute( string prefix, string localName, string ns);
public abstract void WriteStartDocument( );
public abstract void WriteStartDocument( bool standalone);
public void WriteStartElement( string localName);
public void WriteStartElement( string localName, string ns);
public abstract void WriteStartElement( string prefix, string localName, string ns);
public abstract void WriteString( string text);
public abstract void WriteSurrogateCharEntity( char lowChar, char highChar);
public abstract void WriteWhitespace( string ws);
} | |
This class is a fast writer
used to output XML data to a stream or file. Two methods work with
input from an XmlReader object to produce output
from the currently positioned node. WriteAttributes(
) outputs all the node's attributes.
WriteNode( ) dumps the entire current node to the
output stream and moves the XmlReader to the next
node. The remaining
Write* methods of this class take string arguments
that are output as properly formed XML markup. For example,
WriteComment( ) takes a string and outputs it
within <!-- ... --> markup.
WriteStartAttribute( ) and
WriteStartElement( ) provide some flexibility when
writing elements and attributes. These two methods provide the
opening contents of each type, given the name, prefix, and namespace.
The next call can then provide the value of the element or attribute
by other means. For example, you can use WriteString(
) for a simple string value, or another
WriteStartElement( ) to begin a child element.
WriteEndAttribute( ) and WriteEndElement(
) close the writing. The derived XmlTextWriter class provides
formatting functionality to the output data.
Subclasses
XmlTextWriter
Passed To
XmlDocument.Save( ),
XmlNode.{WriteContentTo( ), WriteTo(
)}, System.Xml.Xsl.XslTransform.Transform(
)
|