Menu:

Sponsor

Discover Master of Alchemy, our first iPad/iPhone and iPod touch game!

Forum's topics

Latest Files

Categories

Xpath Example

Flash Version: Flash MX 2004
Total downloads: 11162
Category: Flash AS
File last revision: 12, Jul 2004 03:07:36
License: LGPL

A Flash XML Search Engine type thing, by Dan Tavelli showing how to use XPATH in Flash:
- XPath functions from Neeld Tanksley (www.xfactorstudio.com) XPath for Actionscript
- Seinfeld Show information from TvTome.com

The search has two main parts.
1. The first is the startSearch() function which uses the XPath contains() function.
2. The second part of the search happens when you select one of the results from the datagrid...

NOTES:
- In total all of the XPath actionsript funtions are about 96 KB, which is kind of big, but I think this could be cut down by excluding unneccessary functions and maybe creating one new .as file, but I haven't figured out that yet either.
- More comments in the Fla source file.

- Try looking on www.w3.org/xpath/ for help with xpath and www.xfactorstudio.com for help with the XPath for actionscript functions.
- If you got a question email me at...... dtavelli@lion.lmu.edu

 Comments Feed

Do you like this file? Please make a little donation

Flash content

 

Comments (23)

sd on 12th November 2008

saasa

garag on 16th January 2008

Good morning Mr Tavelli,

I?m Antonio Gargiulo and I?m writing you from Italy.

Thank you in advance for the attention that you will give to my mail and sorry for my English mistakes (probably in this mail there are a lot of error in English).

I?m a junior developer and I?m trying to develop an Application in Flex Builder 2.

I?m looking for a useful example on the web that can help me to solve my problem and I found your example at http://www.sephiroth.it/file_detail.php?id=130 .

The question is the following: I have a WebService that returns me an XML. I would use this XML in order to populate some textbox, select and some other part of the front-end of my web application.

So, I need something in Flex Builder / Actionscript that can give me the possibility to use XPath language to interrogate the XML retuned me from WebService.

I think that your example can be very useful but I?m an inexpert developer in Flex Builder and I don?t know how it is possible to use your example in it.

Any suggestion will be appreciated.

Sorry if I have bored you with stupid question.

Thank you very much.

Kind Regards
________________________________
Antonio Gargiulo
IT Developer
msn account:garag@libero.it

nakliyer on 4th August 2007

Also, A License to Build will address the financial aspects of construction, including how to get a construction job for a company, how to pay for construction (insert headache here), what kinds of training, education, and classes are available for construction work, and even how to carry out a safe, effective construction project.

srirama.83 on 20th December 2006

Is this Search case insensitive ?

hoanv on 13th December 2006

How do I search with key "j" then display "J"?
Note: search with toLowerCase and UpperCase?

mike on 1st September 2006

Extremely new to xml in flash.
Does anyone know where I can find a VERY basic example/tutorial using xpath?

julian.atienza on 23rd May 2006

I'm trying to use the upper-case XPATH function in union with contains (just i was developing an app. that is needed of it).
Now xfactorStudio have no documentation avaliable...

i'm trying with something like:

var strXPATH:String = "//Localidades/Localidad[contains(fichaLocalidad, 'TESTING PHRASE')]";

IF fichaLocalidad contains "testing Phrase" it didn't find any...

trying:
var strXPATH:String = "//Localidades/Localidad[contains(upper-case(fichaLocalidad),'TESTING PHRASE')]";

And a lot of combinations but no correct results...

anybody knows the upper-case implementation of XFACTOR-STUDIO? :(

forapathy on 18th February 2006

Hy.. really nice this xpath implementation.. and really effective search engine.. but i have one small question.. how can i make the search not key sensitive.. i have no ideea how to do that..

freestylerselecta on 20th December 2005

To save others the time and energy here is my own solution for above issue,

// set Url in taUrl textbox
var choosenUrlText = XPath.selectNodes(choosenEpisodeData, "./url")[0].firstChild.nodeValue;
choosenUrlText = choosenUrlText.toString();
newString3 = choosenUrlText; txt.htmltext=taUrl;
// Get url Function
function MyFunc(){
trace ("");
}
taUrl.text = newString3;
knop.onRelease = function () {
getUrl(newString3);
newString3 = "";
}


}

richardworking on 17th November 2005

hi.
How can you implement a DISTINCT clause with XPath.

thanks
richard

Add your comment