אהלן חבר'ה..
עד עכשיו כשהייתי משתמש בקבצי XML הייתי מקבל אותם בצורה הסטנדארטית ביותר:
Using xml Syntax Highlighting
<firstChild>
<child> content here</child>
<child> content here</child>
<child> content here</child>
<child> content here</child>
</firstChild>
<child> content here</child>
<child> content here</child>
<child> content here</child>
<child> content here</child>
</firstChild>
Parsed in 0.001 seconds, using GeSHi 1.0.8.4
ואותם הייתי מפרק למערך כשבכל תא יש את התוכן של child:
Using actionscript Syntax Highlighting
for (i = 0; i < total; i++)
{
_title[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
;
}
{
_title[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
;
}
Parsed in 0.013 seconds, using GeSHi 1.0.8.4
אולם הפעם קיבלתי XML עם הנוסח הבא:
Using xml Syntax Highlighting
<firstChild>
<child id="content" title="content" text="content" link="content">
</child>
<child id="content" title="content" text="content" link="content">
</child>
<child id="content" title="content" text="content" link="content">
</child>
<child id="content" title="content" text="content" link="content">
</child>
</firstChild>
<child id="content" title="content" text="content" link="content">
</child>
<child id="content" title="content" text="content" link="content">
</child>
<child id="content" title="content" text="content" link="content">
</child>
<child id="content" title="content" text="content" link="content">
</child>
</firstChild>
Parsed in 0.003 seconds, using GeSHi 1.0.8.4
אני מתקשה לקרוא אותו בפלאש. כלומר לפרק את המשתנים שבתוך תגיות ה-child.
הכי קרוב שאני מגיע זה להציג את כל התגית:
Using actionscript Syntax Highlighting
וזה מציג לי כפלט את כל התגית. מעבר לזה אני מקבל כל הזמן undefined או null.
אשמח לעזרה
חדשות