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 Chriss Miller 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
Joined
Nov 1, 2005
Messages
2
Location
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.

Similar threads

Replies
4
Views
322
Replies
0
Views
152
Replies
1
Views
251
Replies
3
Views
316

Part and Inventory Search

Sponsor

Back
Top