Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2004
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry DOM xml dataisland parsing problems with IE (not with firefox)

    Firefox 0.9.2 works right, IE 6.0 doesn't.

    What i want to do, and that i was doing without major problems was to javascript-interpret xml data island (throwed by a mod_perl module) to display some information.
    The source goes well, but i've found some dissapointing problems only in IE. This post is only to see if someone already noticed this and if someone has any idea of what i could do.

    The xml data island:

    <xml id="kernel_all_user">
    <root>
    <all_users>
    <one_user>
    <user_info_name>gerard</user_info_name>
    <user_info_pass>gelMBRVXDRhPI</user_info_pass>
    <user_info_born>02-11-2004,08:05</user_info_born>
    <user_info_aforism_text></user_info_aforism_text>
    <user_info_comunity>linux</user_info_comunity>
    <user_info_mail></user_info_mail>
    <user_info_lastMonth>11</user_info_lastMonth>
    <user_info_lastHour>08:05,02</user_info_lastHour>
    <user_info_status>1</user_info_status>
    <user_info_icone>1</user_info_icone>
    <user_registry_histories_sended></user_registry_histories_sended>
    <user_registry_histories_published></user_registry_histories_published>
    <user_registry_forum_posted></user_registry_forum_posted>
    <user_registry_forum_posts></user_registry_forum_posts>
    <user_registry_forum_trolls></user_registry_forum_trolls>
    <user_info_opinion></user_info_opinion>
    <user_info_opinion_date></user_info_opinion_date>
    </one_user>

    <one_user>
    <user_info_name>blogum</user_info_name>
    <user_info_pass>blsWDM.jXiu6Y</user_info_pass>
    <user_info_born>30-10-2004,00:56</user_info_born>
    <user_info_aforism_text></user_info_aforism_text>
    <user_info_comunity>gurus</user_info_comunity>
    <user_info_mail></user_info_mail>
    <user_info_lastMonth>11</user_info_lastMonth>
    <user_info_lastHour>07:21,05</user_info_lastHour>
    <user_info_status>4</user_info_status>
    <user_info_icone>6</user_info_icone>
    <user_registry_histories_sended>6</user_registry_histories_sended>
    <user_registry_histories_published></user_registry_histories_published>
    <user_registry_forum_posted></user_registry_forum_posted>
    <user_registry_forum_posts></user_registry_forum_posts>
    <user_registry_forum_trolls></user_registry_forum_trolls>
    <user_info_opinion></user_info_opinion>
    <user_info_opinion_date></user_info_opinion_date>
    </one_user>

    <one_user>
    <user_info_name>moglum</user_info_name>
    <user_info_pass>mocHBEy7hoBrI</user_info_pass>
    <user_info_born>07-10-103,19:46</user_info_born>
    <user_info_aforism_text>moglum</user_info_aforism_text>
    <user_info_comunity>moglums</user_info_comunity>
    <user_info_mail></user_info_mail>
    <user_info_lastMonth>10</user_info_lastMonth>
    <user_info_lastHour>19:46,07</user_info_lastHour>
    <user_info_status>1</user_info_status>
    <user_info_icone>1000</user_info_info_icone>
    <user_registry_histories_sended></user_registry_histories_sended>
    <user_registry_histories_published></user_registry_histories_published>
    <user_registry_forum_posted></user_registry_forum_posted>
    <user_registry_forum_posts></user_registry_forum_posts>
    <user_registry_forum_trolls></user_registry_forum_trolls>
    <user_info_opinion></user_info_opinion>
    <user_info_opinion_date></user_info_opinion_date>
    </one_user>
    </all_users>
    </root>
    </xml>

    First problem with javsacript DOM node-parsing was that in IE i needed a unique parent for all tags.
    So the simple xml
    <xml><hello><iam>sf</iam></hello></xml>
    worked in both navigators, BUT
    <xml><hello><iam>sf</iam></hello><ei><howareyou>fine</howareyou></ei></xml>
    DON'T.

    Indeed, IE says that xml tag has 0 childs.
    For this reason i added the
    <xml><root>...</root></xml>.
    And then IE went right.

    But now, i see another problem. You can see the large code of before, well, if i simplify to this it WORK:

    <xml id="kernel_all_user">
    <root>
    <all_users>
    <one_user>
    <user_info_name>moglum</user_info_name>
    <user_info_pass>mocHBEy7hoBrI</user_info_pass>
    <user_info_born>07-10-103,19:46</user_info_born>
    <user_info_aforism_text>moglum</user_info_aforism_text>
    <user_info_comunity>moglums</user_info_comunity>
    <user_info_mail></user_info_mail>
    <user_info_lastMonth>10</user_info_lastMonth>
    <user_info_lastHour>19:46,07</user_info_lastHour>
    <user_info_status>1</user_info_status>
    <user_info_icone>1000</user_info_info_icone>
    <user_registry_histories_sended></user_registry_histories_sended>
    <user_registry_histories_published></user_registry_histories_published>
    <user_registry_forum_posted></user_registry_forum_posted>
    <user_registry_forum_posts></user_registry_forum_posts>
    <user_registry_forum_trolls></user_registry_forum_trolls>
    <user_info_opinion></user_info_opinion>
    <user_info_opinion_date></user_info_opinion_date>
    </one_user>
    </all_users>
    </root>
    </xml>

    So the problem is with <one_user> repeated tags.
    This is awful because if i cannot repeat tags then xml is powerless, and firefox (of course) treats all this stuff as everyone expects.

    Any idea???
    Here i post my DOM parse-code:

    xmlIs = document.getElementById('kernel_all_user').childNodes[0];
    for (i=0; i<xmlIs.childNodes.length; i++) {
    if (xmlIs.childNodes[i].nodeType == 1) {
    for (j=0; j<xmlIs.childNodes[i].childNodes.length; j++) {
    if (xmlIs.childNodes[i].childNodes[j].nodeType == 1) {
    all_users[all_users.length] = new object();
    for (k=0; k<xmlIs.childNodes[i].childNodes[j].childNodes.length; k++) {
    if (xmlIs.childNodes[i].childNodes[j].childNodes[k].nodeType == 1) {
    var temp;
    if (xmlIs.childNodes[i].childNodes[j].childNodes[k].childNodes.length > 0) {
    temp = xmlIs.childNodes[i].childNodes[j].childNodes[k].firstChild.nodeValue;
    } else {
    temp = '';
    }
    switch(xmlIs.childNodes[i].childNodes[j].nodeName.toLowerCase()) {
    case 'one_user':
    switch(xmlIs.childNodes[i].childNodes[j].childNodes[k].nodeName.toLowerCase()) {
    case 'user_loged': all_users[all_users.length-1].loged = temp; break;
    case 'user_hourtoday': all_users[all_users.length-1].hourToday = temp; break;
    case 'user_datetoday': all_users[all_users.length-1].dateToday = temp; break;
    case 'user_yeartoday': all_users[all_users.length-1].yearToday = temp; break;
    case 'user_info_name': all_users[all_users.length-1].name = temp; break;
    case 'user_info_born': all_users[all_users.length-1].born = temp; break;
    case 'user_info_aforism_text': all_users[all_users.length-1].aforism_text = temp; break;
    case 'user_info_comunity': all_users[all_users.length-1].comunity = temp; break;
    case 'user_info_mail': all_users[all_users.length-1].mail = temp; break;
    case 'user_info_lastmonth': all_users[all_users.length-1].lastMonth = temp; break;
    case 'user_info_lasthour': all_users[all_users.length-1].lastHour = temp; break;
    case 'user_info_status': all_users[all_users.length-1].status = temp; break;
    case 'user_info_icone': all_users[all_users.length-1].icone = temp; break;
    case 'user_info_registry_histories_sended': all_users[all_users.length-1].histories_sended = temp; break;
    case 'user_info_registry_histories_published': all_users[all_users.length-1].histories_published = temp; break;
    case 'user_info_registry_forum_posted': all_users[all_users.length-1].forum_posted = temp; break;
    case 'user_registry_forum_posts': all_users[all_users.length-1].forum_posts = temp; break;
    case 'user_registry_forum_trolls': all_users[all_users.length-1].forum_trolls = temp; break;
    case 'user_info_opinion': all_users[all_users.length-1].opinion = temp; break;
    case 'user_info_opinion_date': all_users[all_users.length-1].opinion_date = temp; break;
    }
    break;
    }
    }}
    }}
    }}

  • #2
    New to the CF scene
    Join Date
    May 2004
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    but

    the strange thing is that i have a similar xml data island, and this time explorer (firefox always) recognize the structure.

    <xml id="kernel_articles"><root>
    <articles>

    <article>
    <articles_id>blogum</articles_id><articles_status>4</articles_status><articles_subject>assumpte prova modul NEWS</articles_subject><articles_source>agència</articles_source><articles_body>Prova final de la notícia de blogum</articles_body><articles_date>27-07-2004</articles_date><articles_icone>1</articles_icone><articles_planet>gurus</articles_planet><articles_views>57</articles_views><articles_num>11</articles_num><articles_directory>news_blogum</articles_directory><articles_responses><articles_id>prova</articles_id><articles_status>4</articles_status><articles_subject>eps</articles_subject><articles_body>que <remarkA> tal <remarkF> anem </remarkF></remarkA> mira</articles_body><articles_date>29-08-2004</articles_date><articles_icone>1</articles_icone><articles_planet>gurus</articles_planet></articles_responses><articles_responses><articles_id>xcv</articles_id><articles_status>4</articles_status><articles_subject>xcv</articles_subject><articles_body>xcv</articles_body><articles_date>02-09-2004</articles_date><articles_icone>1</articles_icone><articles_planet>gurus</articles_planet></articles_responses><articles_responses><articles_id>dsf gdsf g</articles_id><articles_status>4</articles_status><articles_subject>fgsdf g</articles_subject><articles_body>df gsf gsdfg sd <remarkA> gol </remarkA></articles_body><articles_date>02-09-2004</articles_date><articles_icone>1</articles_icone><articles_planet>gurus</articles_planet></articles_responses><articles_responses><articles_id>g dsf gdsf g</articles_id><articles_status>4</articles_status><articles_subject>sdf gdsf</articles_subject><articles_body>dsf gd drg dfg dfg</articles_body><articles_date>02-09-2004</articles_date><articles_icone>1</articles_icone><articles_planet>gurus</articles_planet></articles_responses><articles_responses><articles_id>gerard</articles_id><articles_status>4</articles_status><articles_subject>bé</articles_subject><articles_body>Docns ho dono per bo, l&apos;error de l&apos;explorer no s&apos;ha repetit amb l&apos;explorer (tot i que tinc el log, per tant <remarkA>...</remarkA> ho dono per a bo</articles_body><articles_date>02-09-2004</articles_date><articles_icone>1</articles_icone><articles_planet>gurus</articles_planet></articles_responses><articles_responses><articles_id>gerard</articles_id><articles_status>4</articles_status><articles_subject>i definitivament, sí</articles_subject><articles_body>Ara l&apos;error del javascript )asquerós) l&apos;he workarounded, ll&apos;astima per lo elegant que quedava amb el mozilla</articles_body><articles_date>02-09-2004</articles_date><articles_icone>1</articles_icone><articles_planet>gurus</articles_planet></articles_responses><articles_responses><articles_id>sdf</articles_id><articles_status></articles_status><articles_subject>sdf</articles_subject><articles_body>sdf</articles_body><articles_date>06-09-2004</articles_date><articles_icone>1000</articles_icone><articles_planet>moglums</articles_planet></articles_responses>
    </article>

    <article>
    <articles_id>blogum</articles_id><articles_status>4</articles_status><articles_subject>assumpte prova modul NEWS</articles_subject><articles_source>agència</articles_source><articles_body>Prova final de la notícia de blogum</articles_body><articles_date>27-07-2004</articles_date><articles_icone>1</articles_icone><articles_planet>gurus</articles_planet><articles_views>11</articles_views><articles_num>10</articles_num><articles_directory>news_blogum</articles_directory><articles_responses><articles_id>xcv </articles_id><articles_status>4</articles_status><articles_subject>xc v</articles_subject><articles_body>xcv x</articles_body><articles_date>02-09-2004</articles_date><articles_icone>1</articles_icone><articles_planet>gurus</articles_planet></articles_responses><articles_responses><articles_id>ssd </articles_id><articles_status>4</articles_status><articles_subject>sd fdas </articles_subject><articles_body>as dfsasa dfasd sadf sdf </articles_body><articles_date>02-09-2004</articles_date><articles_icone>1</articles_icone><articles_planet>gurus</articles_planet></articles_responses>
    </article>

    <article>
    <articles_id>blogum</articles_id> <articles_status>4</articles_status> <articles_subject>prova</articles_subject> <articles_source>sdi que si</articles_source> <articles_body>A veure, si la prova <remark>va bé</remark> o nbo. <newline></newline>Sembla que sí no obstant <newline></newline>Sí que va bé!!!</articles_body> <articles_date>08-04-2004,18:55</articles_date> <articles_icone>1</articles_icone> <articles_planet>gurus</articles_planet> <articles_views>69</articles_views> <articles_num>0</articles_num> <articles_directory>news_apache</articles_directory> <articles_responses> <articles_id>yyyyyyy</articles_id> <articles_status>4</articles_status> <articles_subject>yyyyyyy</articles_subject> <articles_body>yyyyyyyyyyy <remark>va bé</remark> o nbo. <newline></newline>Sembla que</articles_body> <articles_date>07-05-2004,21:32</articles_date> <articles_icone>1000</articles_icone> <articles_planet>moglums</articles_planet> </articles_responses> <articles_responses> <articles_id>yyyyyyy</articles_id> <articles_status>4</articles_status> <articles_subject>yyyyyyy</articles_subject> <articles_body>yyyyyyyyyyy <remark>va bé</remark> o nbo. <newline></newline>Sembla que</articles_body> <articles_date>07-05-2004,21:32</articles_date> <articles_icone>1000</articles_icone> <articles_planet>moglums</articles_planet> </articles_responses><articles_responses><articles_id>gerard</articles_id><articles_status>4</articles_status><articles_subject>collons</articles_subject><articles_body>a veure <remarkC> collons </remarkC></articles_body><articles_date>02-09-2004</articles_date><articles_icone>1</articles_icone><articles_planet>gurus</articles_planet></articles_responses><articles_responses><articles_id>mmm</articles_id><articles_status>4</articles_status><articles_subject>mmm</articles_subject><articles_body>mmmdf gsf gsdfg sd <remarkA> gol </remarkA> fg </articles_body><articles_date>02-09-2004</articles_date><articles_icone>1</articles_icone><articles_planet>gurus</articles_planet></articles_responses>
    </article>

    <article>
    <articles_id>blogum</articles_id> <articles_status>4</articles_status> <articles_subject>prova</articles_subject> <articles_source>sdi que si</articles_source> <articles_body>A veure, si la prova <remark>va bé</remark> o nbo. <newline></newline>Sembla que sí no obstant <newline></newline>Sí que va bé!!!</articles_body> <articles_date>08-04-2004,18:55</articles_date> <articles_icone>1</articles_icone> <articles_planet>gurus</articles_planet> <articles_views>52</articles_views> <articles_num>0</articles_num> <articles_directory>news_linux</articles_directory> <articles_responses> <articles_id>yyyyyyy</articles_id> <articles_status>4</articles_status> <articles_subject>yyyyyyy</articles_subject> <articles_body>yyyyyyyyyyy <remark>va bé</remark> o nbo. <newline></newline>Sembla que</articles_body> <articles_date>07-05-2004,21:32</articles_date> <articles_icone>1000</articles_icone> <articles_planet>moglums</articles_planet> </articles_responses> <articles_responses> <articles_id>yyyyyyy</articles_id> <articles_status>4</articles_status> <articles_subject>yyyyyyy</articles_subject> <articles_body>yyyyyyyyyyy <remark>va bé</remark> o nbo. <newline></newline>Sembla que</articles_body> <articles_date>07-05-2004,21:32</articles_date> <articles_icone>1000</articles_icone> <articles_planet>moglums</articles_planet> </articles_responses>
    </article>

    <article>
    <articles_id>blogum</articles_id><articles_status>4</articles_status><articles_subject>assumpte prova modul NEWS</articles_subject><articles_source>agència</articles_source><articles_body>Prova final de la notícia de blogum</articles_body><articles_date>27-07-2004</articles_date><articles_icone>1</articles_icone><articles_planet>gurus</articles_planet><articles_views>0</articles_views><articles_num>9</articles_num><articles_directory>news_blogum</articles_directory>
    </article>

    <article>
    <articles_id>blogum</articles_id><articles_status>4</articles_status><articles_subject>assumpte prova modul NEWS</articles_subject><articles_source>agència</articles_source><articles_body>Prova final de la notícia de blogum</articles_body><articles_date>27-07-2004</articles_date><articles_icone>1</articles_icone><articles_planet>gurus</articles_planet><articles_views>0</articles_views><articles_num>8</articles_num><articles_directory>news_blogum</articles_directory>
    </article>

    <article> <articles_id>blogum</articles_id> <articles_status>4</articles_status> <articles_subject>prova</articles_subject> <articles_source>sdi que si</articles_source> <articles_body>A veure, si la prova <remark>va bé</remark> o nbo. <newline></newline>Sembla que sí no obstant <newline></newline>Sí que va bé!!!</articles_body> <articles_date>08-04-2004,18:55</articles_date> <articles_icone>1</articles_icone> <articles_planet>gurus</articles_planet> <articles_views>39</articles_views> <articles_num>14</articles_num> <articles_directory>news_news</articles_directory> <articles_responses> <articles_id>yyyyyyy</articles_id> <articles_status>4</articles_status> <articles_subject>yyyyyyy</articles_subject> <articles_body>yyyyyyyyyyy <remark>va bé</remark> o nbo. <newline></newline>Sembla que</articles_body> <articles_date>07-05-2004,21:32</articles_date> <articles_icone>1000</articles_icone> <articles_planet>moglums</articles_planet> </articles_responses> <articles_responses> <articles_id>yyyyyyy</articles_id> <articles_status>4</articles_status> <articles_subject>yyyyyyy</articles_subject> <articles_body>yyyyyyyyyyy <remark>va bé</remark> o nbo. <newline></newline>Sembla que</articles_body> <articles_date>07-05-2004,21:32</articles_date> <articles_icone>1000</articles_icone> <articles_planet>moglums</articles_planet> </articles_responses>
    </article>

    <article> <articles_id>blogum</articles_id> <articles_status>4</articles_status> <articles_subject>prova</articles_subject> <articles_source>sdi que si</articles_source> <articles_body>A veure, si la prova <remark>va bé</remark> o nbo. <newline></newline>Sembla que sí no obstant <newline></newline>Sí que va bé!!!</articles_body> <articles_date>08-04-2004,18:55</articles_date> <articles_icone>1</articles_icone> <articles_planet>gurus</articles_planet> <articles_views>35</articles_views> <articles_num>13</articles_num> <articles_directory>news_news</articles_directory> <articles_responses> <articles_id>yyyyyyy</articles_id> <articles_status>4</articles_status> <articles_subject>yyyyyyy</articles_subject> <articles_body>yyyyyyyyyyy <remark>va bé</remark> o nbo. <newline></newline>Sembla que</articles_body> <articles_date>07-05-2004,21:32</articles_date> <articles_icone>1000</articles_icone> <articles_planet>moglums</articles_planet> </articles_responses> <articles_responses> <articles_id>yyyyyyy</articles_id> <articles_status>4</articles_status> <articles_subject>yyyyyyy</articles_subject> <articles_body>yyyyyyyyyyy <remark>va bé</remark> o nbo. <newline></newline>Sembla que</articles_body> <articles_date>07-05-2004,21:32</articles_date> <articles_icone>1000</articles_icone> <articles_planet>moglums</articles_planet> </articles_responses><articles_responses><articles_id>opstres</articles_id><articles_status>4</articles_status><articles_subject>no no no</articles_subject><articles_body>no es repeteix l&apos;error d&apos;abans!!!!</articles_body><articles_date>02-09-2004</articles_date><articles_icone>1</articles_icone><articles_planet>gurus</articles_planet></articles_responses>
    </article>

    <article> <articles_id>blogum</articles_id> <articles_status>4</articles_status> <articles_subject>prova</articles_subject> <articles_source>sdi que si</articles_source> <articles_body>A veure, si la prova <remark>va bé</remark> o nbo. <newline></newline>Sembla que sí no obstant <newline></newline>Sí que va bé!!!</articles_body> <articles_date>08-04-2004,18:55</articles_date> <articles_icone>1</articles_icone> <articles_planet>gurus</articles_planet> <articles_views>34</articles_views> <articles_num>12</articles_num> <articles_directory>news_news</articles_directory> <articles_responses> <articles_id>yyyyyyy</articles_id> <articles_status>4</articles_status> <articles_subject>yyyyyyy</articles_subject> <articles_body>yyyyyyyyyyy <remark>va bé</remark> o nbo. <newline></newline>Sembla que</articles_body> <articles_date>07-05-2004,21:32</articles_date> <articles_icone>1000</articles_icone> <articles_planet>moglums</articles_planet> </articles_responses> <articles_responses> <articles_id>yyyyyyy</articles_id> <articles_status>4</articles_status> <articles_subject>yyyyyyy</articles_subject> <articles_body>yyyyyyyyyyy <remark>va bé</remark> o nbo. <newline></newline>Sembla que</articles_body> <articles_date>07-05-2004,21:32</articles_date> <articles_icone>1000</articles_icone> <articles_planet>moglums</articles_planet> </articles_responses>
    </article>

    <article> <articles_id>blogum</articles_id> <articles_status>4</articles_status> <articles_subject>prova</articles_subject> <articles_source>sdi que si</articles_source> <articles_body>A veure, si la prova <remark>va bé</remark> o nbo. <newline></newline>Sembla que sí no obstant <newline></newline>Sí que va bé!!!</articles_body> <articles_date>08-04-2004,18:55</articles_date> <articles_icone>1</articles_icone> <articles_planet>gurus</articles_planet> <articles_views>47</articles_views> <articles_num>11</articles_num> <articles_directory>news_news</articles_directory> <articles_responses> <articles_id>yyyyyyy</articles_id> <articles_status>4</articles_status> <articles_subject>yyyyyyy</articles_subject> <articles_body>yyyyyyyyyyy <remark>va bé</remark> o nbo. <newline></newline>Sembla que</articles_body> <articles_date>07-05-2004,21:32</articles_date> <articles_icone>1000</articles_icone> <articles_planet>moglums</articles_planet> </articles_responses> <articles_responses> <articles_id>yyyyyyy</articles_id> <articles_status>4</articles_status> <articles_subject>yyyyyyy</articles_subject> <articles_body>yyyyyyyyyyy <remark>va bé</remark> o nbo. <newline></newline>Sembla que</articles_body> <articles_date>07-05-2004,21:32</articles_date> <articles_icone>1000</articles_icone> <articles_planet>moglums</articles_planet> </articles_responses>
    </article>

    <article>
    <articles_id>blogum</articles_id> <articles_status>4</articles_status> <articles_subject>prova</articles_subject> <articles_source>sdi que si</articles_source> <articles_body>A veure, si la prova <remark>va bé</remark> o nbo. <newline></newline>Sembla que sí no obstant <newline></newline>Sí que va bé!!!</articles_body> <articles_date>08-04-2004,18:55</articles_date> <articles_icone>1</articles_icone> <articles_planet>gurus</articles_planet> <articles_views>33</articles_views> <articles_num>10</articles_num> <articles_directory>news_news</articles_directory> <articles_responses> <articles_id>yyyyyyy</articles_id> <articles_status>4</articles_status> <articles_subject>yyyyyyy</articles_subject> <articles_body>yyyyyyyyyyy <remark>va bé</remark> o nbo. <newline></newline>Sembla que</articles_body> <articles_date>07-05-2004,21:32</articles_date> <articles_icone>1000</articles_icone> <articles_planet>moglums</articles_planet> </articles_responses> <articles_responses> <articles_id>yyyyyyy</articles_id> <articles_status>4</articles_status> <articles_subject>yyyyyyy</articles_subject> <articles_body>yyyyyyyyyyy <remark>va bé</remark> o nbo. <newline></newline>Sembla que</articles_body> <articles_date>07-05-2004,21:32</articles_date> <articles_icone>1000</articles_icone> <articles_planet>moglums</articles_planet> </articles_responses>
    </article>

    </articles>
    </root></xml>

    Here there is the <root> and the <articles>, before there was the <root> and the <all_users>.

    The parse code is identycal:

    var xmlIs = document.getElementById('kernel_articles').childNodes[0];
    for (i=0; i<xmlIs.childNodes.length; i++) {
    if (xmlIs.childNodes[i].nodeType == 1) {
    for (j=0; j<xmlIs.childNodes[i].childNodes.length; j++) {
    if (xmlIs.childNodes[i].childNodes[j].nodeType == 1) {
    switch(xmlIs.childNodes[i].childNodes[j].nodeName.toLowerCase()) {
    case 'article':
    articles_info[articles_info.length] = new object();
    articles_info[articles_info.length-1].responses = new Array();
    break;
    }
    for (k=0; k<xmlIs.childNodes[i].childNodes[j].childNodes.length; k++) {
    if (xmlIs.childNodes[i].childNodes[j].childNodes[k].nodeType == 1) {
    var temp = xmlIs.childNodes[i].childNodes[j].childNodes[k];
    switch(xmlIs.childNodes[i].childNodes[j].childNodes[k].nodeName.toLowerCase()) {
    case 'validating': article_status.validating = temp; break;
    case 'section_name': article_status.section = temp; break;
    case 'section_from': article_status.from = temp; break;
    case 'section_total': article_status.total = temp; break;
    case 'articles_id': articles_info[articles_info.length-1].id = temp; break;
    case 'articles_status': articles_info[articles_info.length-1].status = temp; break;
    case 'articles_subject': articles_info[articles_info.length-1].subject = temp; break;
    case 'articles_source': articles_info[articles_info.length-1].source = temp; break;
    case 'articles_body': articles_info[articles_info.length-1].body = temp; break;
    case 'articles_date': articles_info[articles_info.length-1].date = temp; break;
    case 'articles_icone': articles_info[articles_info.length-1].icone = temp; break;
    case 'articles_planet': articles_info[articles_info.length-1].planet = temp; break;
    case 'articles_num': articles_info[articles_info.length-1].num = temp; break;
    case 'articles_views': articles_info[articles_info.length-1].views = temp; break;
    case 'articles_directory': articles_info[articles_info.length-1].directory = temp; break;
    case 'articles_responses':
    articles_info[articles_info.length-1].responses[articles_info[articles_info.length-1].responses.length] = new object();
    articles_info[articles_info.length-1].responses[articles_info[articles_info.length-1].responses.length-1].node = temp;
    break;
    }
    }}
    }}
    }}


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •