bool ElementNameEndsWithJpg( Element e ) { string s = e.Name; return 3 < s.Length && s.EndsWith( ".jpg" ); }