Closed irkush closed 11 years ago
When adding a new element to the XmlWriter the value is checked for null.
Later inside the method that adds the valud to the Writer, the value is checked for null again.
Example:
if (individualIdentity.FirstName != null) { WriteSimpleElement("firstname", individualIdentity.FirstName); } private void WriteSimpleElement(string name, string value) { if (value == null) { return; } _xmlw.WriteStartElement(name); if (!value.Equals("")) { _xmlw.WriteChars(value.ToCharArray(), 0, value.ToCharArray().Length); } _xmlw.WriteEndElement(); }
Solved in b09f10fbf80d8b0f4db01071e08ea83c72e3c4e0
When adding a new element to the XmlWriter the value is checked for null.
Later inside the method that adds the valud to the Writer, the value is checked for null again.
Example: