lib/editors/parser_helper.js
function getXmlElementFromRawIndexes(root, indexInfo) {
  let parentPackage = root;
  for (let j = 0; j < indexInfo.path.length; j++) {
    parentPackage = parentPackage.packagedElement[indexInfo.path[j]];
  }
  return parentPackage.packagedElement[indexInfo.index];
}
function getXmlElementFromRawIndexes(root, indexInfo) {
  let parentPackage = root;
  for (let j = 0; j < indexInfo.path.length; j++) {
    parentPackage = parentPackage.packagedElement[indexInfo.path[j]];
  }
  return parentPackage.packagedElement[indexInfo.index];
}
function getXmlElementFromRawIndexes ( root , indexInfo ) { let parentPackage = root ; for ( let j = 0 ; j < indexInfo . path . length ; j ++ ) { parentPackage = parentPackage . packagedElement [ indexInfo . path [ j ] ] ; } return parentPackage . packagedElement [ indexInfo . index ] ; }
Extract indexInfo in rawIndexes array and use it to get the referenced element
@param root the root document
@param indexInfo the index info element
@returns {Object} the xml element
Extract indexInfo in rawIndexes array and use it to get the referenced element