private static copyrightType ReadCopyright( XElement element ) { element.RequireArgument<XElement>( "element" ).NotNull<XElement>(); XNamespace ns = element.Name.Namespace; copyrightType copyright = new copyrightType(); if( element.Element( ns + "year" ) != null ) copyright.year = element.Element( ns + "year" ).Value; if( element.Element( ns + "license" ) != null ) copyright.license = element.Element( ns + "license" ).Value; if( element.Element( ns + "author" ) != null ) copyright.author = element.Attribute( ns + "author" ).Value; return copyright; }