Показать сообщение отдельно
Старый 30.01.2008, 09:11
LevinSoft вне форума Посмотреть профиль Отправить личное сообщение для LevinSoft Найти все сообщения от LevinSoft
  № 4  
Ответить с цитированием
LevinSoft

Регистрация: Oct 2007
Сообщений: 29
Отправить сообщение для LevinSoft с помощью ICQ
Вот нашел функцию, которая вроде как парсит XML, тока че то толку от этого больше не стало...

Код HTML:
loadXML = function() {
var songs_xml:XML = new XML();
songs_xml.ignoreWhite = true;
//library.dataProvider = this.firstChild;
songs_xml.load("test_library.xml");
};
parseXML = function() {
	if (songs_xml.hasChildNodes) {
		var xmlRootNode = myXMLfirstChild.childNodes;
		for (var i = 0; i < xmlRootNode.length; i++) {
			var thisNode = xmlRootNode[i];
			if (thisNode != null) {
				var strDep = thisNode.childNodes[0].firstChild.nodeValue;
				var strSales = thisNode.childNodes[1].firstChild.nodeValue;
				var strEmpl = thisNode.childNodes[2].firstChild.nodeValue;
				arrlibrary.push ({Dep:strDep,Sales:strSales,Employees:strEmpl});
			}
		}
	}
library.dataProvider = arrlibrary;
}