XmlElement test=new XmlElement(); test.Attributes.Count;//接点数目if(test.Attributes["arr1"].Value==null){//没有属性}else //有属性