I'm trying to loop through an XMLList and rather than giving me each item in the list as XML, it's just coming back with the positions as strings e.g.
[Code]...
It just alerts "0" or "1". If I inspect the 'item' variable, I see the same thing. But if I inspect 'myList' it looks like the XML. I've also tried myList.children() and strongly typing 'items' to 'XML' but nothing I do has worked.
I am trying to parse some XML i have retrieved via e4x in an HTTPService. The loop works and for each episode in the list it goes through the loop. However i get the following error when it is trying to append to an XMLList.TypeError: Error #1009: Cannot access a property or method of a null object reference.I am trying to query the local SQLite database and see if the episode exists (working) and if it does append to one xmllist and if not then append to the other xmllist.
public static function seasonFavHandler(evt:ResultEvent):void { Application.application.ManagePage.selectedShow = Application.application.ManagePage.gridFavourites.selectedItem as XML;
I am trying to get my loop to look through the XMLList and print out each entry before moving on the next but it prints out all three then loops through the whole things three times??
I've been getting into some xml finally, and came across how handy the XMLList. As I understand it, the XMLList can be treated almost like an array.
[Code]....
I can trace the xmlDoc variable and get the entire xml document I'm trying to pull in - but if I want to just bring in the entries or the content within them, I get a big 'undefined'. Am I using the xmlList wrong? How should I be able to get an array without having to loop through all the xml Document stuff? here's an example of the xml pulled.
I have an XMLList 'Keywords', which consists of about 30 elements. I want to count the number of unique keywords in the List, and how often they occur. Then display the top 3 most occuring keywords.
Basically, the individual XML objects are updating but they are not updating in the "folders" XMLList object.
What can i do to update them in the "folders" object ?
I have used a similar approach to update all of the attributes of an XMLList object and everything worked ok. I am not sure what exactly causes the differences between the attributes and the elements.
I have the following XMLList and am trying to return the XMLList with the node having the label Mail Box or Outbox, depending on string variable called folder. folder can either be equal to "Mail Box" or "Outbox".
If I have an XMLList object in Flex, what is the proper way to check to see if the list is empty? Should I just compare the result of myList.length() > 0, myList.toString() != "" or try another method altogether?
Is there anyway of type casting an ArrayCollection to xmllistcollection or to xmllist or can we covert ArrayCollection to xmllistcollection or to xmllist?
What it says on the tin: I have an XMLList, and I want to find where in it a particular XML item falls. First index is good enough for my purposes. Note that I have no problem writing a function to do this by hand... but I was hoping that the API has something buried somewhere that'll do it for me. I didn't see it, though.
However this displays the datagrid with two rows, the first row has 1 in the Series column and then the two files crammed into the second cell in the same row. The second row is the same but has the number 2 in the Series column and the two series #2 files crammed into the cell next to it.If i do not use the nested data class i can pull the files using Series.file instead and all 4 of the files list correctly, however i do not get the Series number for each...
I have seen numerous examples on how to remove duplicates in ArrayCollection but I can't seem to transpose this to XMLList. In most ArrayCollection examples, the example compares the key of the array with hasOwnProperty method and return a bool. That's fine, but what would I compare to when using an XMLList? Let's say I have:
Given this XML code:[code]I can count the total number of game elements in the XML.game with:[code]Is there please some way to print the number of all game elements having the exact number of 3 user children? And also count all such elements with less than 3 user children?[code]The backgound is, that I have a Flex game, where up to 3 players can sit at a playing table and I'm trying to display the number of All, Vacant and Full playing tables there (the top left row with RadioButtons, sorry for the non-English language):I'm reading the XMLList doc, but don't see how to do it with one-liners, I only can see how to do it with loops...
There is something I couldn't solve: when I search a specific node in a XMLList containing several level of hierarchy, filter never search in the top parent node. For example, if I have a tree like this:
My Flash designer is reading an XML stream I'm sending back to the browser (I'm a C# dev). We have this working fine.
He is then selecting into an XMLList where a element has its id a certain value i.e. . This is also working just fine.
In this XmlList, are Events, that look a little something like this:
event startdate enddate end event
I don't know how to use the formatting here - but each of those items is an element. startdate would have a value such as 04/02/2010 and enddate 6/30/2010.
Now, from this XmlList I do have of Events, I need to select all Events where a new variable myDate, falls in between the startdate and enddate.
The aim is to get the flat xmllist out of a xml: each item of the xmllist would be a descendant (not just child) of the xml. This way I have all the nodes of an xml inside the xmllist.
I am trying to make a simple news feed. Same code as the Basic AS3 XML sample by Lee. Can't get the XMLList to return anything.If I trace the var "xml" I get my xmlfile. But as soon as I try to trace the newsBoxContent XMLList object, I get "undefined" in the output window. Here's the AS3 code:[code]