private void UpdateAttributes(DataSet data, XmlElement node, string key)
{
List<KeyValuePair<string, string>> attributes;
if (!data.Attributes.TryGetValue(key, out attributes))
return;
foreach (var attribute in attributes)
node.SetAttribute(attribute.Key, attribute.Value);
}