System.Xml.XmlWriter.WriteElementString C# (CSharp) Method

WriteElementString() public method

public WriteElementString ( string prefix, String localName, String ns, String value ) : void
prefix string
localName String
ns String
value String
return void
        public void WriteElementString(string prefix, String localName, String ns, String value) {
            WriteStartElement(prefix, localName, ns);
            if (null != value && 0 != value.Length) {
                WriteString(value);
            }
            WriteEndElement();
        }

Same methods

XmlWriter::WriteElementString ( string localName, String value ) : void
XmlWriter::WriteElementString ( string localName, String ns, String value ) : void

Usage Example

Example #1
1
 private static void WriteAlbum(XmlWriter writer, string albumTitle, string artist)
 {
     writer.WriteStartElement("album");
     writer.WriteElementString("title", albumTitle);
     writer.WriteElementString("artist", artist);
     writer.WriteEndElement();
 }
All Usage Examples Of System.Xml.XmlWriter::WriteElementString