error77
asked on
Flex loading (number of results) from xml
Hi all,
I have a flex project that reads an xml file.
I'm currently using loadXML(); where it will load the whole xml...?
Is there a way where I can specify a search where I could get it to load a specified number of nodes or result?
Thanks
I have a flex project that reads an xml file.
I'm currently using loadXML(); where it will load the whole xml...?
Is there a way where I can specify a search where I could get it to load a specified number of nodes or result?
Thanks
Missed a close-paren there
myTemp.appendChild(myXML.c hildren()[ i]);
myTemp.appendChild(myXML.c
ASKER
So, would 'i' be the search? For example, if I add a search inputtext and a button and insert something to search for...how would I do that? Thanks for your time by the way!
ASKER
In other words. How do I perform a search once XML is loaded. Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Fantastic! Thank you!
But, once you have XML loaded from the server into an XML variable, myXML, you can make a new XML assigned to myTempXML containing any subset of the total nodes in a range from, say firstNode:int to lastNode:int, like this:
myTempXML = <temp/>;
for(var i:int = firstNode; i < lastNode && i < myXML.children().length();
myTemp.appendChild(myXML.c
}