// Collect element namespace prefix and name, check element exist and
// create them according to schema definition.
final XPathParser xpathParser = new XPathParser(new StringReader(clonedMetadata.getQualifiedName()+"/"+result.two()));
// Start from the root of the metadata document
Token currentToken = xpathParser.getNextToken();
Token previousToken = currentToken;
int depth = 0;
Element currentNode = clonedMetadata;
boolean existingElement = true;
boolean isAttribute = false;