rem:  if(node && node.getAttribute && node.getAttribute("parseWidgets") && node.getAttribute("parseWidgets") == "false") { return {}; } 
context: 	this.parseElement = function(node, hasParentNodeSet, optimizeForDojoML, thisIdx){		var parsedNodeSet = {};				var tagName = getTagName(node);		//There's a weird bug in IE where it counts end tags, e.g. </dojo:button> as nodes that should be parsed.  Ignore these		if((tagName)&&(tagName.indexOf("/")==0)){			return null;		}				// look for a dojoml qualified name		// process dojoml only when optimizeForDojoML is true		var process = true;		if(optimizeForDojoML){			var dojoTagName = getDojoTagName(node);			tagName = dojoTagName || tagName;			process = Boolean(dojoTagName);		}				if(node && node.getAttribute && node.getAttribute("parseWidgets") && node.getAttribute("parseWidgets") == "false") {			return {};		}		parsedNodeSet[tagName] = [];		var pos = tagName.indexOf(":");		if(pos>0){			var ns = tagName.substring(0,pos);			parsedNodeSet["ns"] = ns;			// honor user namespace filters			if((dojo.ns)&&(!dojo.ns.allow(ns))){process=false;}		}		if(process){			var attributeSet = this.parseAttributes(node);			for(var attr in attributeSet){				if((!parsedNodeSet[tagName][attr])||(typeof parsedNodeSet[tagName][attr] != "array")){					parsedNodeSet[tagName][attr] = [];				}				parsedNodeSet[tagName][attr].push(attributeSet[attr]);			}				// FIXME: we might want to make this optional or provide cloning instead of			// referencing, but for now, we include a node reference to allow			// instantiated components to figure out their "roots"			parsedNodeSet[tagName].nodeRef = node;			parsedNodeSet.tagName = tagName;			parsedNodeSet.index = thisIdx||0;		}		var count = 0;		for(var i = 0; i < node.childNodes.length; i++){			var tcn = node.childNodes.item(i);			switch(tcn.nodeType){				case  dojo.dom.ELEMENT_NODE: // element nodes, call this function recursively					count++;					var ctn = getDojoTagName(tcn) || getTagName(tcn);					if(!parsedNodeSet[ctn]){						parsedNodeSet[ctn] = [];					}					parsedNodeSet[ctn].push(this.parseElement(tcn, true, optimizeForDojoML, count));					if(	(tcn.childNodes.length == 1)&&						(tcn.childNodes.item(0).nodeType == dojo.dom.TEXT_NODE)){						parsedNodeSet[ctn][parsedNodeSet[ctn].length-1].value = tcn.childNodes.item(0).nodeValue;					}					break;				case  dojo.dom.TEXT_NODE: // if a single text node is the child, treat it as an attribute					if(node.childNodes.length == 1){						parsedNodeSet[tagName].push({ value: node.childNodes.item(0).nodeValue });					}					break;				default: break;				/*				case  dojo.dom.ATTRIBUTE_NODE: // attribute node... not meaningful here					break;				case  dojo.dom.CDATA_SECTION_NODE: // cdata section... not sure if this would ever be meaningful... might be...					break;				case  dojo.dom.ENTITY_REFERENCE_NODE: // entity reference node... not meaningful here					break;				case  dojo.dom.ENTITY_NODE: // entity node... not sure if this would ever be meaningful					break;				case  dojo.dom.PROCESSING_INSTRUCTION_NODE: // processing instruction node... not meaningful here					break;				case  dojo.dom.COMMENT_NODE: // comment node... not not sure if this would ever be meaningful 					break;				case  dojo.dom.DOCUMENT_NODE: // document node... not sure if this would ever be meaningful					break;				case  dojo.dom.DOCUMENT_TYPE_NODE: // document type node... not meaningful here					break;				case  dojo.dom.DOCUMENT_FRAGMENT_NODE: // document fragment node... not meaningful here					break;				case  dojo.dom.NOTATION_NODE:// notation node... not meaningful here					break;				*/			}		}		//return (hasParentNodeSet) ? parsedNodeSet[node.tagName] : parsedNodeSet;		//if(parsedNodeSet.tagName)dojo.debug("parseElement: RETURNING NODE WITH TAGNAME "+parsedNodeSet.tagName);		return parsedNodeSet;	};
meta: 4707	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4707/50c3492c4c3c825dbd3401e134a19ed46799c456/Parse.js/buggy/www/resources/dojo-ajax/src/xml/Parse.js