How to Create a Salesforce package.xml File Online
A quick guide to Salesforce metadata manifests, with a practical XML example and a free tool to build your own.
Create a package.xml manifest โWhat is package.xml?
A Salesforce package.xml file is a metadata manifest that lists the component types and members to include in a Metadata API retrieve or deployment workflow. It can specify Apex classes, triggers, custom objects, fields, flows, layouts, and other supported metadata.
Example package.xml
This example includes two Apex classes and one Apex trigger. Replace the sample member names with the API names from your project.
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>AccountService</members>
<members>ContactService</members>
<name>ApexClass</name>
</types>
<types>
<members>AccountTrigger</members>
<name>ApexTrigger</name>
</types>
<version>66.0</version>
</Package>
Use an API version that matches your project and tooling. A valid XML structure does not guarantee that every component exists or that a deployment will succeed.
Create a manifest online
- Open the Salesforce package.xml Generator.
- Select the metadata types you need.
- Enter the component API names.
- Review the generated XML and API version.
- Copy or download
package.xmlfor your workflow.
More than generating XML
You can also import and merge an existing manifest, compare XML files to review added or removed members, and prepare a ZIP for a destructive-changes workflow.
Review all component names and destructive changes before using the files in a release.
Use the free browser-based generator to create and review your Salesforce
package.xml.Open the generator โ