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

Discussion in 'Javascript' started by Marek Mänd, Feb 20, 2005.

  1. Marek Mänd

    Marek Mänd Guest

    <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
     
    Marek Mänd, Feb 20, 2005
    #1
    1. Advertising

  2. 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/
     
    Martin Honnen, Feb 20, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hannes Heckner
    Replies:
    1
    Views:
    772
    Martin Honnen
    Oct 13, 2003
  2. bearclaws
    Replies:
    4
    Views:
    4,712
    bearclaws
    Mar 1, 2005
  3. Replies:
    2
    Views:
    878
  4. eggie5
    Replies:
    1
    Views:
    531
    Joseph Kesselman
    Oct 2, 2007
  5. Marek
    Replies:
    1
    Views:
    1,601
    Marek
    Jun 24, 2008
Loading...

Share This Page