CSharp examples for System.Xml:XML Element
Writes the non null XML element string.
using System.Xml.Serialization; using System.IO;//ww w . j ava 2 s .c o m using System.Xml; using System.Text.RegularExpressions; using System; public class Main{ /// <summary> /// Writes the non null element string. /// </summary> /// <param name="writer">The writer.</param> /// <param name="name">The name.</param> /// <param name="value">The value.</param> /// <remarks></remarks> public static void WriteNonNullElementString(XmlWriter writer, string name, string value) { if (value != null) { writer.WriteElementString(name, value); } } }