Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > mz js select nodes with xpath, having by specific attribute named'class' the 'subvalue part' set

Reply
Thread Tools

mz js select nodes with xpath, having by specific attribute named'class' the 'subvalue part' set

 
 
Marek Mänd
Guest
Posts: n/a
 
      02-20-2005
<style>
.marek{}
</style>
etc..
<root>
<element class="marek mand"/>
<element class="mand marek blah"/>
<element class="mand marekmänd"/>
<element class="mand marekk"/>
</root>

I would like to know what is the XPath expression for Mozillas
JavaScript document.evaluate method first argument, if i want to get all
the nodes, that have the 'css'-class named "marek" set.

By above data only 2 elements should be returned, because they and they
only have the 'css' class "marek" set. The XPath expression should not
match 'marekk' nor 'marekmänd'.


I read few articles about xpath and i didnt saw any regular expressions
to be used there, but what i saw was that the xpath string functions are
definately too weak and clumsy to achieve my goal. I am new to XPath,
smz o i thought some master regular could teach me a bit.

TIA
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      02-20-2005


Marek Mänd wrote:

> <style>
> .marek{}
> </style>
> etc..
> <root>
> <element class="marek mand"/>
> <element class="mand marek blah"/>
> <element class="mand marekmänd"/>
> <element class="mand marekk"/>
> </root>
>
> I would like to know what is the XPath expression for Mozillas
> JavaScript document.evaluate method first argument, if i want to get all
> the nodes, that have the 'css'-class named "marek" set.


Asked already in netscape.public.mozilla.xml and answered there in
<news://news.mozilla.org:119/cva6es$>

--

Martin Honnen
http://JavaScript.FAQTs.com/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XSL select only nodes which contain a specific child node William Krick XML 4 03-18-2011 09:54 AM
Parsing DOM to search specific tags with specific custom attribute William FERRERES Javascript 7 07-09-2007 08:11 PM
Select nodes where an attribute contains some sub-text Duncan XML 2 02-09-2006 04:46 PM
XSLT: how to match attribute having a specific value? Gerald Aichholzer XML 5 05-25-2005 10:55 AM
How to select nodes whose parent has a specific attribute bearclaws XML 4 03-01-2005 10:05 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57