Large XML data in Flash player have lots of issues.  I thoroughly
investigated the issue and I posted a bug here
(https://bugs.adobe.com/jira/browse/SDK-15113).  It shows that you
can't repeatedly download more than 3M of xml and have your browser
stable, it will crash.  There are leaks when you convert string to XML
 , when you save XML to local storage, maybe more issues but I stopped
there.

If you want to have 25Mb XML loading/saving more than once, you should
change your strategy.  Download/save in chunks less than 1Mb (I know,
sucks!).  Basically, avoid var a:XML = XML(str); where str is >1Mb. 
If you have flexible server, maybe use AMF and download binary object,
or use JSON (I can't guarantee the stability of those approaches as I
didn't try them).

As for the UI, the best thing to do for your tree is to have a virtual
tree, i.e a tree that dynamically display data when you open the node.
 This way, the tree doesn't hold duplicate data, just reference.

Anyway, looks like any solution you will try is not simple, so good
luck, and keep us in touch with your solution.

Ilam

--- In [email protected], "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> This does sound like server oriented work.  However, If the OP is only
> going to search the data, and not attempt to display it all in a tree,
> it might not be unreasonable.  AS3 is very fast for in-memory stuff, the
> slow part is the rendering.
> 
>  
> 
> Assuming you are certain you want to do this on the client, then you do
> not need to do anything special.  XMLListCollection is optional, and
> XMLList is inherent in any e4x expression result.  Just get the data as
> XML(resultFormat="e4x"), and using a result handler, put the data into
> an instance-level variable,and execute the e4x query against that var.  
> 
>  
> 
> I suggest you test this with the full-data load before you get too far
> into the implementation.
> 
>  
> 
> Really does sound like server work...
> 
>  
> 
> Tracy
> 
>  
> 
> ________________________________
> 
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of ben.clinkinbeard
> Sent: Monday, April 14, 2008 12:25 PM
> To: [email protected]
> Subject: [flexcoders] Re: Reading & Parsing Large XML File . . .
> 
>  
> 
> I don't think you want to load 25MB of data into Flash Player... bad
> things will probably happen. Putting that much into tree a would
> almost certainly be a very bad scene. Can you put the data into a
> database somewhere and query that?
> 
> Ben
> 
> --- In [email protected] <mailto:flexcoders%40yahoogroups.com>
> , Gooee Guy <guygooee@> wrote:
> >
> > Thanks for the hint. Yes, I can actually read the file and display
> it in a tree control, for example.
> > 
> > The format of the XML is something like this (simplified):
> > 
> > <ac val="435">
> > <ph val="2010011">
> > <ph val="2010012">
> > <ph val="2010013">
> > <ph val="2010014">
> > </ac>
> > <ac val="801">
> > 
> > <ph val="2011011">
> > 
> > <ph val="2012012">
> > 
> > <ph val="2013013">
> > 
> > <ph val="2014014">
> > 
> > 
> > </ac>
> > 
> > Currently, my biggest problem is this: If I just read in the XML
> into Flex 3 with an mx:XML tag, everything works fine. I can even
> search for specific values and highlight the search result in the tree.
> > 
> > However, that's for the simplified test scenario. The actual XML
> file is about 25MB, and I have to download it weekly (from the
> National Do Not Call Registry). So, I thought I had to do something
> more elegantly (with HTTPService and XMLList and/or XMLListCollection)
> to read in that large XML file.
> > 
> > And, again, I can read in and display the contents of the XML file,
> but I just can't search through the contents of the tree control
> anymore when I switch from a simple <mx:XML> tag to either the XMLList
> and/or XMLListCollection.
> > 
> > Any hints? Links? Dope slaps?
> > 
> > 
> > Subject: [flexcoders] Re: Reading & Parsing Large XML File . . .
> > 
> > Do you know the name of the node it would be in? If
> so, something like
> > this should be all you need:
> > 
> > uberXml..(phoneNode == "555-555-5555" )
> > 
> > HTH,
> > Ben
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> __________________________________________________________
> > Be a better friend, newshound, and 
> > know-it-all with Yahoo! Mobile. Try it now. 
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> <http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ> 
> >
>


Reply via email to