function createControls(node) {
			// differentiate between SAPUI5 and plain-HTML children
			if (node.namespaceURI === "http://www.w3.org/1999/xhtml" || node.namespaceURI === "http://www.w3.org/2000/svg" ) {
				var id = node.attributes['id'] ? node.attributes['id'].textContent || node.attributes['id'].text : null;

				if (bEnrichFullIds) {
					return XMLTemplateProcessor.enrichTemplateIdsPromise(node, oView, bAsync).then(function(){
						// do not create controls
						return [];
					});
				} else {
					// plain HTML node - create a new View control
					// creates a view instance, but makes sure the new view receives the correct owner component
					var fnCreateView = function (oViewClass) {
						var mViewParameters = {
							id: id ? getId(oView, node, id) : undefined,
							xmlNode: node,
							containingView: oView._oContainingView,
							processingMode: oView._sProcessingMode // add processing mode, so it can be propagated to subviews inside the HTML block
						};
						// running with owner component
						if (oView.fnScopedRunWithOwner) {
							return oView.fnScopedRunWithOwner(function () {
								return new oViewClass(mViewParameters);
							});
						}
						// no owner component
						// (or fully sync path, which handles the owner propagation on a higher level)
						return new oViewClass(mViewParameters);
					};

					if (bAsync) {
						return new Promise(function (resolve, reject) {
							sap.ui.require(["sap/ui/core/mvc/XMLView"], function(XMLView) {
								resolve([fnCreateView(XMLView)]);
							});
						});
					} else {
						var XMLView = sap.ui.requireSync("sap/ui/core/mvc/XMLView");
						return SyncPromise.resolve([fnCreateView(XMLView)]);
					}
				}

			} else {
				// non-HTML (SAPUI5) control
				return createControlOrExtension(node);
			}
		}
function createControls(node) {
			// differentiate between SAPUI5 and plain-HTML children
			if (node.namespaceURI === "http://www.w3.org/1999/xhtml" || node.namespaceURI === "http://www.w3.org/2000/svg" ) {
				var id = node.attributes['id'] ? node.attributes['id'].textContent || node.attributes['id'].text : null;

				if (bEnrichFullIds) {
					return XMLTemplateProcessor.enrichTemplateIdsPromise(node, oView, bAsync).then(function(){
						// do not create controls
						return [];
					});
				} else {
					// plain HTML node - create a new View control
					// creates a view instance, but makes sure the new view receives the correct owner component
					var fnCreateView = function (oViewClass) {
						var mViewParameters = {
							id: id ? getId(oView, node, id) : undefined,
							xmlNode: node,
							containingView: oView._oContainingView,
							processingMode: oView._sProcessingMode // add processing mode, so it can be propagated to subviews inside the HTML block
						};
						// running with owner component
						if (oView.fnScopedRunWithOwner) {
							return oView.fnScopedRunWithOwner(function () {
								return new oViewClass(mViewParameters);
							});
						}
						// no owner component
						// (or fully sync path, which handles the owner propagation on a higher level)
						return new oViewClass(mViewParameters);
					};

					if (bAsync) {
						return new Promise(function (resolve, reject) {
							sap.ui.require(["sap/ui/core/mvc/XMLView"], function(XMLView) {
								resolve([fnCreateView(XMLView)]);
							});
						});
					} else {
						var XMLView = sap.ui.requireSync("sap/ui/core/mvc/XMLView");
						return SyncPromise.resolve([fnCreateView(XMLView)]);
					}
				}

			} else {
				// non-HTML (SAPUI5) control
				return createControlOrExtension(node);
			}
		}
function createControls ( node ) { // differentiate between SAPUI5 and plain-HTML children if ( node . namespaceURI === "http://www.w3.org/1999/xhtml" || node . namespaceURI === "http://www.w3.org/2000/svg" ) { var id = node . attributes [ 'id' ] ? node . attributes [ 'id' ] . textContent || node . attributes [ 'id' ] . text : null ; if ( bEnrichFullIds ) { return XMLTemplateProcessor . enrichTemplateIdsPromise ( node , oView , bAsync ) . then ( function ( ) { // do not create controls return [ ] ; } ) ; } else { // plain HTML node - create a new View control // creates a view instance, but makes sure the new view receives the correct owner component var fnCreateView = function ( oViewClass ) { var mViewParameters = { id : id ? getId ( oView , node , id ) : undefined , xmlNode : node , containingView : oView . _oContainingView , processingMode : oView . _sProcessingMode // add processing mode, so it can be propagated to subviews inside the HTML block } ; // running with owner component if ( oView . fnScopedRunWithOwner ) { return oView . fnScopedRunWithOwner ( function ( ) { return new oViewClass ( mViewParameters ) ; } ) ; } // no owner component // (or fully sync path, which handles the owner propagation on a higher level) return new oViewClass ( mViewParameters ) ; } ; if ( bAsync ) { return new Promise ( function ( resolve , reject ) { sap . ui . require ( [ "sap/ui/core/mvc/XMLView" ] , function ( XMLView ) { resolve ( [ fnCreateView ( XMLView ) ] ) ; } ) ; } ) ; } else { var XMLView = sap . ui . requireSync ( "sap/ui/core/mvc/XMLView" ) ; return SyncPromise . resolve ( [ fnCreateView ( XMLView ) ] ) ; } } } else { // non-HTML (SAPUI5) control return createControlOrExtension ( node ) ; } }
Takes an arbitrary node (control or plain HTML) and creates zero or one or more SAPUI5 controls from it,
iterating over the attributes and child nodes.

@return {Promise} resolving to an array with 0..n controls
@private
Takes an arbitrary node ( control or plain HTML ) and creates zero or one or more SAPUI5 controls from it iterating over the attributes and child nodes .
Creates controls from the DOM node