Constructing a Project Manifest
The package.xml file is a project manifest that lists all the components you want to retrieve or deploy in a single request. You can retrieve or deploy only a single package at a time.
The following elements may be defined in package.xml:
Name | Description |
---|---|
<fullName> | The name of the server-side package to deploy into. If the <fullName> field is omitted, components will not be assigned to a package when deployed, and will be in the unpackaged package. This field is not used for retrieve. |
<types> | This element contains one or more <members> tags and one <name> tag, and is used to list the metadata components of a certain type to retrieve or deploy. |
<members> | The full name of a component. There is one <members> element defined for each component in the directory. You can replace the value in this member with the wildcard character * (asterisk) instead of listing each member separately. This is a child element of <types>. |
<name> | Contains the type of the component, for example CustomObject or Profile. There is one name defined for each component type in the directory. This is a child element of <types>. |
<version> | The Metadata API version number of the files being retrieved or deployed. When deploying, all the files must conform to the same version of the Metadata API. |
For a complete list of the component types that can be defined by the <name> element in package.xml, see Metadata Types in the Metadata API Developer Guide.
Specifying Standard Objects
To retrieve standard objects and/or custom fields on standard objects, you must name the component in package.xml. The following package.xml file will retrieve a single field EngineeringReqNumber__c, on the Case object, as well as the entire Account object.
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>Case.EngineeringReqNumber__c</members>
<name>CustomField</name>
</types>
<types>
<members>Account</members>
<name>CustomObject</name>
</types>
<version>64.0</version>
</Package>