Specifying Named Components
To retrieve a component, specify the type of component in the <name> element and declare each component to be retrieved or deployed in the <members> element. The following is a sample package.xml project manifest that names two custom objects to be retrieved or deployed:
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>MyCustomObject__c</members>
<members>MyHelloWorldObject__c</members>
<name>CustomObject</name>
</types>
<version>64.0</version>
</Package>
Some metadata components are sub-components of another component. This means you must dot-qualify the sub-component with the parent component name.
The following metadata components are defined as part of an object:
- CustomField
- Picklist
- RecordType
- Weblink
- ValidationRule
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>Opportunity.ValidationRuleName</members>
<name>ValidationRule</name>
</types>
<version>64.0</version>
</Package>