Groups | Blog | Home
all groups > flash actionscript > april 2005 >

flash actionscript : parse large string


meni56
4/17/2005 12:00:00 AM
Hi
I'm working with XMLSOCKECT and i'm getting large strings that i have to parse.
Is there any proplem to parse large string in flash?
What is the best way?
And what the best way for later Manipulation like order by date,name ETC?
Blade alSlayer
4/17/2005 12:00:00 AM
Are the strings in XML syntax? If so - there are helpful methods of the XML
class there. You could store the strings in an array and use the sorting
function with a custom comparing function in order to sort by different
criteria...
meni56
4/17/2005 12:00:00 AM
The string is comaing with delimiter i can do split and it return Array
Blade alSlayer
4/19/2005 12:00:00 AM
Hmm I don't think the performance will be good if you do such a manipulation
inside Flash. Can't you structure your data and pass it to Flash as XML? It
will be better, I think.
However you could always try to implement some string algorythms in
ActionScript, but I am not familiar with those unfortunately...
What kind of processing do you have to do, anyway?
meni56
4/19/2005 12:00:00 AM
Is the manipulation of xml in flaash is better then on string is it the same?
Blade alSlayer
4/21/2005 12:00:00 AM
Well, parcing XML will be faster I think, but it depends on how powerful
algorythms you use to manipulate the strings.
Anyway, using XML WILL be much easier, because Flash gives you all you need -
there will be no need to implement any parcing algorythms...
Can you alter the data that is being sent to you? Is that sending script
yours? If it is, make it send XML data rather then pure strngs. (NOTE that xml
data is also a string but with special structure.)
AddThis Social Bookmark Button