Derived classes may decide that the element should not be written. For example, the text element shouldn't be written if it's empty.
public virtual bool ShouldWriteElement()