private void NewXmlNode(string styleName) { this.Node =this.Document.CreateNode("legend","chart"); XmlAttribute xa=this.Document.CreateAttribute ("style-name","chart"); xa.Value =styleName; Node.Attributes .Append (xa); }