-
Hi all,
I have been trying to load an XML document into flash.
The XML document has about 300 records and flash cannot load that in 15 seconds. 15 seconds on the same frame in flash will cause an error message that say you can abort the script (this is a flash default) Macromedia support recommened to use a server side app that would query the document so only selected records would be returned. Or set up flash to load in a loop of 2 frames that would avoid the timeout error. To be honest if it will take more than 15 seconds to load XML i'd rather use the query version.
Anyone ran into this problem and has a solution?
My XML document is here:
http://homepage.mac.com/gmarton/XML/Detail2.xml
Oh, i just tested this link it takes IE over 60 seconds to parse this
Thanks
-
Uhh...
Please don't take this too harshly.. your XML doc's a mess bro... I would definently look into squeezing some of those childNodes into attributes of their parent node... that will cut down on your time considerably.
I've posted a thread on this very thing::
http://board.flashkit.com/board/show...hreadid=170326
-
Senior Member
The fact that your XML file is 240k should be an indication that you need to cut it down a bit.
The only think I could recommend if you don't want to cut it down is XML-Nitro
The smart guys at figleaf have a better way: XMLNitro 1.3 beta
http://chattyfig.figleaf.com/~bhall/...ff/XMLnitro.as
This routine replaces the standard XML routines and gets a 75~130% increase in speed. And se the diskussion around it....
http://www.were-here.com/forums/show...threadid=78637
-
xml file
Thanks for the help. Unfortunately the creation of this XML file is out of my control it gets dumped from an Oracle server.
-
Senior Member
Perhaps you could write a post process routine, or you could use a XSLT process to cut down your XML. If there is reduntant data in your XML XSLT would be able to cut it out.
Thanks
Luke
-
I agre with the others the xml is very messy...
but you can also use this frameBased parser at:
http://www.alabamasubs.com/541am/xmlq/
i didn't use it myself but maybe it will help you!
If time on one frame takes to long it moves on one frame and goes on parsing...
regards
-
Thanks
Thanks, I will give it a try. So far what I got to work was an ASP page that loads the xml file and I was able to pull data from it with XML DOM.
The challenge is still that i nedd to build a list from tags and not to repeat them if they exist more than once. I tried XSLT but it seems it is harder to learn than VBScript.
Thanks again,
George
-
one more thing
I have to build a list . If I make flash load the XML directly and have flash do the work it is going to much slower as opposed to a script that provides already filtered data for flash and just uss the load variables command instead of load.XML.
Am I right?
Here's one record:
<ANSWER id="3">
<MAIN_CATEGORY name="Firm Information">
<SUB_CATEGORY>Background and General Information</SUB_CATEGORY>
</MAIN_CATEGORY>
<KEY_WORDS used="4">
<K1>History</K1>
<K2>firm</K2>
<K3>company</K3>
<K4>background</K4>
</KEY_WORDS>
<KEY_PHRASE>History * firm * company * background</KEY_PHRASE>
<SAMP_QUES>Provide a brief history of your firm.</SAMP_QUES>
<LINK>link.htm</LINK>
<Deadline></Deadline>
<CriticalNote>False</CriticalNote>
<Note></Note>
<Created>Friday, April 27, 2001</Created>
<Author>Jacob Armstrong</Author>
<Modified>Wednesday, June 06, 2001</Modified>
<ModifiedBy></ModifiedBy>
<Reviewer></Reviewer>
<SecLevel>Admin</SecLevel>
</ANSWER>
-
oops
now that did not work... i forgot to parse URL
-
You are right if you would have a serverside preParser
that takes youre oracle output and makes it a little nicer to flash to read....
this would do the job.... better...
Or make chunks of XML (let's say 10 records) display them and add a next and prviouse button...
With call to the server XML.sendAndLoad
with a xml in it like
(request)
(page)1(/page)
(/request)
the server answers you with:
(response)
(datarow)...(/datarow)
(datarow)...(/datarow)
(datarow)...(/datarow)
(datarow)...(/datarow)
...
(/response)
-
process of elimination
Thanks,
but stil have to load the whole thing because a have to create a list from the MAIN_CATEGORY attributes and another filtered list from MAIN_CATEGORY's firstchild based on the main category attibutes.
As far as I know I can only do this if I load all the records and go thru them one by one.
' <MAIN_CATEGORY name="Firm Information">
' <SUB_CATEGORY>Background and General Information</SUB_CATEGORY>
' </MAIN_CATEGORY>
' <KEY_WORDS used="4">
' <K1>History</K1>
' <K2>firm</K2>
' <K3>company</K3>
' <K4>background</K4>
' </KEY_WORDS>
' <KEY_PHRASE>History * firm * company * background</KEY_PHRASE>
' <SAMP_QUES>Provide a brief history of your firm.</SAMP_QUES>
' <LINK>link.htm</LINK>
' <Deadline></Deadline>
' <CriticalNote>False</CriticalNote>
'' <Note></Note>
' <Created>Friday, April 27, 2001</Created>
' <Author>Jacob Armstrong</Author>
' <Modified>Wednesday, June 06, 2001</Modified>
' <ModifiedBy></ModifiedBy>
' <Reviewer></Reviewer>
' <SecLevel>Admin</SecLevel>
' </ANSWER>
-
another thing that would help you is to load up your xml on your server, like in an ASP page and just save it again...that should strip out all the whitespace ahead of time, so Flash doesn't have to! Why Flash hasn't always just done that automatically is beyond me...I'm hoping for something better in the way of XML in Flash 6!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|