Skip to content

Instantly share code, notes, and snippets.

@benares98
Created May 7, 2012 20:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benares98/2630213 to your computer and use it in GitHub Desktop.
Save benares98/2630213 to your computer and use it in GitHub Desktop.
dom parser issue
function displayLocationInfo(xml){
$("soap").update(xml);
var parser = new DOMParser();
var doc = parser.parseFromString(xml, "application/xml");
var rootElement = doc.documentElement;
var queryColumns = rootElement.getElementsByTagName("QueryResponseHelper");
WL.Logger.debug("client value: "+ xml);
var item, i;
var ul = $('locationList');
for(i = 0; i < queryColumns.length; i += 1){
item = queryColumns[i];
li = new Element('li');
text = new Element('div', {'class' : 'locationRecord'}).update(item.recordId.nodeValue);
li.insert(text);
ul.insert(li);
//li.observe('click', selectTab.bind(this, LOCATION_DESCRIPTION_TAB, item, li));
}
afterDisplayItems();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment