![]() |
|
||||||||||
|
|||||
|
[+3 16.09.08]
Регистрация: Jan 2008
Адрес: flex.org
Сообщений: 211
|
подскажите как такой вот xml флешом распарсить и данные выгрузить во флеш:
<?xml version="1.0" encoding="utf-8"?> <room> <userid>6</userid> <username>itm.test3@gmail.com</username> <password>e10adc3949ba59abbe56e057f20f883e</password> <trackname1>http://media.imeem.com/m/8yrK4zbKQN/aus=false/</trackname1> <trackname2>http://media.imeem.com/m/giOkmaYE5D/aus=false/</trackname2> <trackname3>http://media.imeem.com/m/RbBXCLvk9u/aus=false/</trackname3> <toptenfriends1>mahesh student</toptenfriends1> <descrition1></descrition1> <toptenfriends2>Charles Giangreco</toptenfriends2> <descrition2>Best Friend</descrition2> <aboutme>This video sort of shows a preview of what things are to come. It was originally meant to be shown at CES 2008, but had to be taken down. You'll see a lot of cross integration with many devices. The UI concept is also simila</aboutme> <myinterests>This video sort of shows a preview of what things are to come. It was originally meant to be shown at CES 2008, but had to be taken down. You'll see a lot of cross integration with many devices. The UI concept is also simila</myinterests> <muslike>This video sort of shows a preview of what things are to come. It was originally meant to be shown at CES 2008, but had to be taken down. You'll see a lot of cross integration with many devices. The UI concept is also simila</muslike> <instrplay>This video sort of shows a preview of what things are to come. It was originally meant to be shown at CES 2008, but had to be taken down. You'll see a lot of cross integration with many devices. The UI concept is also simila</instrplay> <movieslike>This video sort of shows a preview of what things are to come. It was originally meant to be shown at CES 2008, but had to be taken down. You'll see a lot of cross integration with many devices. The UI concept is also simila</movieslike> <telshow>This video sort of shows a preview of what things are to come. It was originally meant to be shown at CES 2008, but had to be taken down. You'll see a lot of cross integration with many devices. The UI concept is also simila</telshow> <booksread>This video sort of shows a preview of what things are to come. It was originally meant to be shown at CES 2008, but had to be taken down. You'll see a lot of cross integration with many devices. The UI concept is also simila</booksread> <heroes>This video sort of shows a preview of what things are to come. It was originally meant to be shown at CES 2008, but had to be taken down. You'll see a lot of cross integration with many devices. The UI concept is also simila</heroes> <sports>This video sort of shows a preview of what things are to come. It was originally meant to be shown at CES 2008, but had to be taken down. You'll see a lot of cross integration with many devices. The UI concept is also simila</sports> <messages></messages> <img1>http://www.bloust.com/images/students_images/61195542756.jpeg</img1> <chanel1>http://www.youtube.com/v/ylhWagV5rCQ</chanel1> <chanel2>http://www.youtube.com/v/G3fnuWOUXdk</chanel2> <chanel3>http://www.youtube.com/v/1rJWW_KqeAw</chanel3> </room> |
|
|||||
|
ветеран форума
|
Идем циклом по xmlInstance.firstChild.firstChild и вытаскиваем nodeValue согласно nodeName
__________________
4am is time to rock |
|
|||||
|
[+3 16.09.08]
Регистрация: Jan 2008
Адрес: flex.org
Сообщений: 211
|
DarkLight а по детальней можно?
|
|
|||||
|
ветеран форума
|
Предположим, что эти данные лежат в test.xml, тогда:
var xmlInstance:XML = new XML();
xmlInstance.onLoad = parseData;
xmlInstance.ignoreWhite = true;
xmlInstance.load("test.xml");
function parseData(suc:Boolean):Void {
if (suc) {
var data1:XMLNode = xmlInstance.firstChild;
for(var i:XMLNode = data1.firstChild;i!=null;i = i.nextSibling){
trace(i+" "+i.nodeName+" -> "+i.firstChild);
}
}
}
__________________
4am is time to rock |
|
|||||
|
[+3 16.09.08]
Регистрация: Jan 2008
Адрес: flex.org
Сообщений: 211
|
data1 - это у Вас элемент узла в xml?
|
|
|||||
|
ветеран форума
|
В данном случае это ссылка на содержимое тега <room>
__________________
4am is time to rock |
|
|||||
|
[+3 16.09.08]
Регистрация: Jan 2008
Адрес: flex.org
Сообщений: 211
|
ясно, а если не сложно, то подскажите как дальше действовать?
|
|
|||||
|
Banned
[+1 21.02.08]
[+4 21.02.08] [+5 13.03.08] [+4 13.03.08] Регистрация: Feb 2008
Сообщений: 63
|
а дальше распарсить и занести XML в обьект или в массив,кому как удобнее.
|
|
|||||
|
[+3 16.09.08]
Регистрация: Jan 2008
Адрес: flex.org
Сообщений: 211
|
понятно, судя из ответа chingachgoog, дельного ответа так и не получил, но может кто все же сможет подсказать как данный xml легче всего обработать флешом и выгрузить текстовую информацию в во флешку
|
![]() |
![]() |
Часовой пояс GMT +4, время: 23:47. |
|
|
« Предыдущая тема | Следующая тема » |
|
|