public override void WriteEndAttribute() {
VerifyState(Method.WriteEndAttribute);
XmlAttribute attr = write as XmlAttribute;
if (attr == null) {
throw new InvalidOperationException();
}
if (!attr.HasChildNodes) {
XmlNode node = document.CreateTextNode(string.Empty);
AddChild(node, attr);
}
write = attr.OwnerElement;
}