Sorting Criteria used for XML Sibling Elements

The definition of well-formedness as per the XML 1.0 specifications states that attributes are unordered, but it does not guarantee the order of elements.

The order of XML elements is important especially when you have sibling XML elements (or elements with child elements).

To overcome the risk of improperly ordered elements when importing and exporting XML packages, XML elements are ordered by element name and primary attribute.

The table below lists the criteria used for sorting XML elements that are siblings:

XML element path

Criteria

/EmailTemplates/EmailTemplate

TemplateName

/CustomActions/CustomAction

Name

/OptionSets/OptionSet

Name

/OptionSets/OptionSet/OptionSetItems/OptionSetItem

Name

/EntityStatuses/EntityStatus

Name

/Actions/Action

Name

/ActionGroups/ActionGroup/Actions/Action

Name

/ActionGroups/ActionGroup

Name#EntityName#EntityFormName

/EntityMenuSections/EntityMenuSection

Label

/DataImportTemplates/DataImport

Name#EntityName

/DataImportTemplates/DataImport/DataImportAttributes/DataImportAttribute

ColumnName#AttributeName

/SystemPramaters/SystemParameter

Name

/Entities/Entity

Name

/Forms/EntityForm and all other places where EntityForm appears in a list

Name#EntityName

/Forms/EntityForm/Sections/EntityFormSection

Name

/Forms/EntityForm/HeaderItems/EntityFormHeaderItem

Label

/Forms/EntityForm/FooterItems/EntityFormFooterItem

Label

/Forms/EntityForm/FilteredFields/EntityFormFilteredField

AttributeToFilter#AttributeToFilterBy#AttributeToFilterReference

/Forms/EntityForm/OptionFields/EntityFormOptionField

AttributeName

/Views/EntityView and all other places where EntityView appears in a list

Name#EntityName

/Views/EntityView/EntityViewColumns/EntityViewColumn

Label

/Attributes/Attribute and all other places where Attribute appears in a list

Name#EntityName

/Charts/Chart

Name

/Dashboards/Dashboard

Name

/Reports/Report

Name

/Reports/Report/ReportItems/ReportItem

Name

/Reports/Report/ReportItems/ReportParameter

Name

/Workflows/Workflow

Name

/WorkflowLibraries/WorkflowLibrary

Name

/Workflows/Workflow/Libraries/WorkflowLibrary

Name

/DocumentReports/DocumentReport

Name

/BusinessWorkflows/BusinessWorkflow

Name

/BusinessWorkflows/BusinessWorkflow/Statuses/Status

Name

/BusinessWorkflows/BusinessWorkflow/Rules/Rule

Name

/Relationships/Relationship

Name#ReferencedEntityName#ReferencedAttributeName

#ReferencingEntityName#ReferencingAttributeName

#RelationshipType#RelationshipConstraint

/Entities/Entity/Relationships/Relationship

Name#ReferencedEntityName#ReferencedAttributeName

#ReferencingEntityName#ReferencingAttributeName

#RelationshipType#RelationshipConstraint

/CoreSettings/CoreSetting

Name

/ClientScriptLibraries/ClientScriptLibrary

Name

/HtmlWidgets/HtmlWidget

Name