---
schema_version: "1"
id: 6542852c9af45ef1179f0aefc8e344def18ea05a653324076ef2276628cf122e
title: Specifying Named Components
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/salesforce-migration-guide/guides/daas/daas-package-named-components.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-migration-guide/guide/daas-package-named-components.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 7de81e22ab494a0de0bada6daf373d7c57d6d4209863f3be992e74cbd161c923
products:
  - Ant Migration Tool Guide
  - Platform Developer Content
---

# Specifying Named Components

**note:** The Ant Migration Tool is retired with Spring ’24. The tool continues to function as-is for future API versions but isn’t updated with new functionality and isn’t supported.  If Salesforce adds a new feature that is incompatible with Ant, the Ant Migration Tool won't be updated to support it. To manage metadata changes, switch to Salesforce CLI for a modern, supported developer experience.

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
<?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>68.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`

For example, the following code retrieves a validation rule called `ValidationRuleName` on the Opportunity object:

```xml
<?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>68.0</version>
</Package>
```

