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!

return attribute value containing certain characters

Status
Not open for further replies.

gibblin

Technical User
Oct 9, 2003
27
GB
Hi,

I have code which is working fine, it's picking up data from the following path:-

path="/category/event[@name='Man U v Arsenal']/type[@name='Match']/@points";

However i need it to pick up all events where 'Arsenal' are involved, not just 'Man U v Arsenal'. So i need a 'like' statement or something. I've tried incorporating 'contains' but to no avail.

I've searched high and low for an answer. Any ideas anyone? It'd be appreciated.
 
oh this is for a website being coded in php.
 
>path="/category/event[@name='Man U v Arsenal']/type[@name='Match']/@points";
[tt]path="/category/event[[red]contains(@name,'Arsenal')[/red]]/type[@name='Match']/@points";[/tt]

>[previous thread]
>xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
[tt]xmlDoc=new ActiveXObject("Msxml2.DOMDocument.4.0"); //or higher[/tt]
 
hi, thanks for the reply, i'll let u know how i get on.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top