public static ScriptElement Load(XElement xml, string filename) { FileDefinitionHelper.ValidateElementName(xml, ElementName); var result = new ScriptElement(); result.DecodeAttributes(xml); result.DecodeValue(xml, filename); FileDefinitionHelper.ValidateAttribute(result.Name, ElementName, AttributeName); return(result); }
public static DatasetElement Load(XElement xml) { FileDefinitionHelper.ValidateElementName(xml, ElementName); var result = new DatasetElement(); result.DecodeAttributes(xml); result.DecodeData(xml); FileDefinitionHelper.ValidateAttribute(result.Name, ElementName, AttributeName); return(result); }