Empty text elements are not legal - only write this element if it has children.
public override bool ShouldWriteElement()