If data was declared as an ArrayCollection rather than an Object you woudn't need to do this, but there's nothing wrong with doing it that way either. Thanks for the solution, you saved the day.
I have been looking for a solution for quite a while. Enter your email address to subscribe to this blog. Connect and share knowledge within a single location that is structured and easy to search.
This works good but uses some odd syntax of the XMLList. The last statement can be placed on one line if desired. Your current implementation is more than sufficient.
The only optimisation you could make though I wouldn't bother unless you are using Vector. It would best look something like this:. I've confirmed this in flash myself. Personally it makes sense to me to use the optional line, and reference labels[0] etc. I know you're asking for an array of strings as the output, but basically I'm asking you why you can't just use the array accessors of an XMLList object. Here's a fine walk-through on that: Senocular on E4X.
Why'd you need that? But you could give this a try:. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Find centralized, trusted content and collaborate around the technologies you use most. Connect and share knowledge within a single location that is structured and easy to search.
I have search a while on the internet and havn't found any answer. In my own tests, encoding simple objects works well as indicated above , but complex types tend to produce unpredictable results. For example, encoding an array of Font objects produced a long list of empty item nodes. But depending on the types you're attempting to serialize, this approach might work out just fine for you.
Hope it helps! You could try using the descibeType method that takes in an object and converts it to xml - however i think this just converts the class outline? Might be a start though. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow.
Hi when i used your code its gives error and says that rows which is the xml file components in your file is not String value and it does not have default value what should i do? Thanks for your help. Chris, Hmm.. Hi Hillel… Nice tip… To implement this function in my project… How i can refer the arraycollection returned by function for other components manipulate? Thanks, Silva Developer. Hi Hillel Sorry for taking so long to respond.
Yes, the web service only ever returns one StockQuote with one Stock child. For me use the arraycollection returned of the function, how i can do this? For example. If you understanded now, show me in as code. Best regards, Silva Developer silva. Great… Very good! Thanks, Silva Developer silva. Hi, Hillel! Doing so, I can only specify root name , but xml children will have name and will look like this: This not what I want. I must perform such xml in some other way.
Looking forward to your reply. Thank you, Christie. Best, Hillel. Anyone can help me? Your help will be highly appreciated. There is an error on entering the screen name. Thanks for your article! Emilio, Happy to hear it, thanks for letting me know.
Hi… and thanks a lot for your excellent article. I am populating a tree from a remote CFC call. I have used your function, replacing the rows. Any idea, is it to do with my XML structure…? Thanks in advance, Alain.
0コメント