[364419] Adjust priority/order of default XMI content handler.
diff --git a/plugins/org.eclipse.uml2.uml.resources/src/org/eclipse/uml2/uml/resources/util/UMLResourcesUtil.java b/plugins/org.eclipse.uml2.uml.resources/src/org/eclipse/uml2/uml/resources/util/UMLResourcesUtil.java
index af43264..0f4694c 100644
--- a/plugins/org.eclipse.uml2.uml.resources/src/org/eclipse/uml2/uml/resources/util/UMLResourcesUtil.java
+++ b/plugins/org.eclipse.uml2.uml.resources/src/org/eclipse/uml2/uml/resources/util/UMLResourcesUtil.java
@@ -187,6 +187,16 @@
 
 		if (resourceSet == null) {
 			contentHandlers = ContentHandler.Registry.INSTANCE
+				.get(ContentHandler.Registry.LOW_PRIORITY);
+
+			if (contentHandlers == null
+				|| !contentHandlers.contains(XMI_CONTENT_HANDLER)) {
+
+				ContentHandler.Registry.INSTANCE.put(
+					ContentHandler.Registry.LOW_PRIORITY, XMI_CONTENT_HANDLER);
+			}
+
+			contentHandlers = ContentHandler.Registry.INSTANCE
 				.get(ContentHandler.Registry.NORMAL_PRIORITY);
 
 			if (contentHandlers == null) {
@@ -199,10 +209,6 @@
 				.getContentHandlers();
 		}
 
-		if (!contentHandlers.contains(XMI_CONTENT_HANDLER)) {
-			contentHandlers.add(XMI_CONTENT_HANDLER);
-		}
-
 		if (!contentHandlers.contains(UML2_1_0_0_CONTENT_HANDLER)) {
 			contentHandlers.add(UML2_1_0_0_CONTENT_HANDLER);
 		}
@@ -255,6 +261,12 @@
 			contentHandlers.add(CMOF_2_4_1_CONTENT_HANDLER);
 		}
 
+		if (resourceSet != null
+			&& !contentHandlers.contains(XMI_CONTENT_HANDLER)) {
+
+			contentHandlers.add(XMI_CONTENT_HANDLER);
+		}
+
 		(resourceSet == null
 			? Resource.Factory.Registry.INSTANCE
 			: resourceSet.getResourceFactoryRegistry())