Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

selectNodes problem

Status
Not open for further replies.

purephaser

Technical User
Nov 1, 2005
2
US
I want to select company name text for every company that has a campaign/media/print element. I'm using flash and am able to do this.

var company = XPath.selectNodes(this,"portfolio/company/name/text()");
and retrieve all companies.

Here is a snippet of the xml file
<portfolio>
<company ID = "106">
<name>ALPINE</name>
<campaign ID ="1">
<name>1</name>
<media>
<print>001.jpg</print>
</media>
</campaign>
</company>
</portfolio>

I tried to use
var company = XPath.selectNodes(this,"portfolio/company[campaign/media/print]");

but this returns a complete XML text not the company names.
 
Nevermind I did this and it works yipee!!!


var tv = XPath.selectNodes(this,"portfolio/company[campaign/media/tv]/name/text()");

by the way I use XPath from Xfactor for Flash and XML works great!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top