List views are part of the CustomObject
metadata entity. If you open up a .object
file (the XML source for a custom object), you'll see top-level entries like this:
<listViews>
<fullName>All</fullName>
<filterScope>Everything</filterScope>
<label>All</label>
</listViews>
that define each of your list views.
Note that the CustomObject
type in your package.xml
is also used to pull customizations like list views for standard objects. If you include a standard object in your package.xml
,
<types>
<members>Task</members>
<name>CustomObject</name>
</types>
You'll get back all of its non-private list views.
If you just pull down custom fields on a standard object (with the CustomField
type), you won't get the list views back.
You can select list views individually with the ListView
type in your package.xml
:
<types>
<members>Account.My_List_View</members>
<name>ListView</name>
</types>
but they'll still be stored in your .object
files.