// Use a pattern that's not possible any other way.
//
if (xmlMap != null && (feature = getFeature(peekObject, null, "", true)) != null)
{
EFactory eFactory = getFactoryForPrefix(prefix);
// This is for the case for a local unqualified element that has been bound.
//
if (eFactory == null)
{
eFactory = feature.getEContainingClass().getEPackage().getEFactoryInstance();
}
EObject newObject = null;
if (useNewMethods)
{
newObject = createObject(eFactory, helper.getType(eFactory, name), false);
}
else
{
newObject = createObjectFromFactory(eFactory, name);
}
newObject = validateCreateObjectFromFactory(eFactory, name, newObject, feature);
if (newObject != null)
{
setFeatureValue(peekObject, feature, newObject);
}
processObject(newObject);
}
else
{
// This handles the case of a substitution group.
//
if (xmlMap != null)
{
EFactory eFactory = getFactoryForPrefix(prefix);
EObject newObject = createObjectFromFactory(eFactory, name);
validateCreateObjectFromFactory(eFactory, name, newObject);
if (newObject != null)
{
for (EReference eReference : peekObject.eClass().getEAllReferences())