dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Is there a limit to the size of XML?

  1. #1
    Senior Member
    Join Date
    Nov 2001
    Location
    Houston TX
    Posts
    563

    Is there a limit to the size of XML?

    Hi,

    I am finding a strange limit to an XML file I am using in Flash 8.
    The XML file is 10.3K which has 32 items in the structure.

    Here is one item:

    <videos>
    <catagory>
    <feature>
    <height1>240</height1>
    <width1>360</width1>
    <height2>120</height2>
    <width2>160</width2>
    <image>thumbnails/annie1.jpg</image>
    <link1>videos/annie_bortz360_3256K_Stream.flv</link1>
    <link2>videos/annie_bortz160_356K_Dial_Up_Stream.flv</link2>
    <text>A testimonial from Annie Bortz</text>
    </feature>
    </catagory>
    </videos>


    When I increase the XML file to over 22 features The Flash routine
    doesn't quit but just doesn't see them and when I do a trace on the length,

    _global.totalSubC = topNode.firstChild.childNodes.length;

    It reports 22 even when there are over 22 features in the file.

    I have gone over the XML file for hidden characters but there are none.

    Is there a limit to parsing XML in Flash?

    Best regards
    Toby
    Best regards
    Toby Mack

    For the best and funniest Audio Blog on the Internet come visit:

    http://feeds.feedburner.com/Fla****UpBlog

  2. #2
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    Honolulu
    Posts
    2,429
    I've imported XML as big as 400k with no errors. It could be in your import method. Are you using XML.sendAndLoad? Are you ignoring whitespace?

  3. #3
    FK Slacker
    Join Date
    Jun 2000
    Location
    vancouver
    Posts
    3,208
    Are you sure there isn't just a broken tag somewhere in the XML?

    That file size should be no problem at all...

    K.

  4. #4
    Senior Member
    Join Date
    Nov 2001
    Location
    Houston TX
    Posts
    563
    Here is the code for loading and parsing:

    videos_xml = new XML();
    videos_xml.load("video.xml");
    videos_xml.ignoreWhite = true;
    videos_xml.onLoad = startVideoShow;
    function startVideoShow(success)
    {
    _global.z = 0;
    _global.c = 0;
    _global.pic =0;
    if (success == true)
    {
    topNode = videos_xml.firstChild;
    _global.totalVideoCat = topNode.childNodes.length;
    _global.totalSubC = topNode.firstChild.childNodes.length;
    trace(totalSubC);
    trace(totalVideoCat);
    c=0;
    for (var catagoryNode = videos_xml.firstChild.firstChild; catagoryNode != null; catagoryNode = catagoryNode.nextSibling)
    {
    videoCatagoryNode[c] = catagoryNode;
    item_videoCatagoryNode[c] = videoCatagoryNode[c].attributes.cat;
    setNode = videoCatagoryNode[c].childNodes;
    totalSubCat = videoCatagoryNode[c].childNodes.length;
    // _global.num = totalSubCat;
    for (z = 0; z<totalSubCat; z++)
    {
    subSetNode[z] = setNode[z].childNodes;
    video_height1 = setNode[z].firstChild;
    _global.value_video_height1[z] = video_height1.firstChild.nodeValue;
    video_width1 = setNode[z].firstChild.nextSibling;
    _global.value_video_width1[z] = video_width1.firstChild.nodeValue;
    video_height2 = setNode[z].firstChild.nextSibling.nextSibling ;
    _global.value_video_height2[z] = video_height2.firstChild.nodeValue;
    video_width2 = setNode[z].firstChild.nextSibling.nextSibling.nextSibling ;
    _global.value_video_width2[z] = video_width2.firstChild.nodeValue;
    video_image = setNode[z].firstChild.nextSibling.nextSibling.nextSibling.ne xtSibling ;
    _global.value_video_image[z] = video_image.firstChild.nodeValue;
    video_link1 = setNode[z].firstChild.nextSibling.nextSibling.nextSibling.ne xtSibling.nextSibling ;
    _global.value_video_link1[z] = video_link1.firstChild.nodeValue;
    video_link2 = setNode[z].firstChild.nextSibling.nextSibling.nextSibling.ne xtSibling.nextSibling.nextSibling ;
    _global.value_video_link2[z] = video_link2.firstChild.nodeValue;
    image_text = setNode[z].firstChild.nextSibling.nextSibling.nextSibling.ne xtSibling.nextSibling.nextSibling.nextSibling ;
    _global.i_text[z] = image_text.firstChild.nodeValue;
    trace(value_video_height1[z]);
    trace(value_video_width1[z]);
    trace(value_video_height2[z]);
    trace(value_video_width2[z]);
    trace(value_video_image[z]);
    trace(value_video_link1[z]);
    trace(value_video_link2[z]);
    trace(i_text[z]);
    }


    I looked at the tags and I was not able to see anything that would
    Stop the loading of the XML file.

    Toby
    Best regards
    Toby Mack

    For the best and funniest Audio Blog on the Internet come visit:

    http://feeds.feedburner.com/Fla****UpBlog

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center