xpath pattern matching

Discussion in 'XML' started by malc, Nov 23, 2005.

  1. malc

    malc Guest

    How do I do pattern matching with xpath?

    Say I want to match

    <b> It is cold <b/>

    I have tried match="htm:b[contains(text(),'is')

    But it doesn't seem to work. Can anyone help?
    malc, Nov 23, 2005
    #1
    1. Advertising

  2. In article <dm2ro2$c00$-infra.bt.com>,
    malc <> wrote:
    >How do I do pattern matching with xpath?
    >
    >Say I want to match
    >
    ><b> It is cold <b/>


    Presumably you really have </b>, not <b/>

    >I have tried match="htm:b[contains(text(),'is')


    And presumably you have the missing ] at the end, and b is in the htm
    namespace.

    Then it should work. You'll have to give a complete example if you want
    anyone to investigate further.

    -- Richard
    Richard Tobin, Nov 23, 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. Marvin_123456

    "Memory leak" in javax.xml.xpath.XPath

    Marvin_123456, Jul 29, 2005, in forum: Java
    Replies:
    4
    Views:
    1,964
    jan V
    Jul 29, 2005
  2. ahogue at theory dot lcs dot mit dot edu

    XPath subtree pattern matching

    ahogue at theory dot lcs dot mit dot edu, Jul 28, 2003, in forum: XML
    Replies:
    2
    Views:
    1,233
    Dimitre Novatchev
    Jul 29, 2003
  3. Hardy Merrill

    DOM XPath pattern matching

    Hardy Merrill, May 12, 2004, in forum: XML
    Replies:
    1
    Views:
    647
    Martin Honnen
    May 12, 2004
  4. Marc Bissonnette

    Pattern matching : not matching problem

    Marc Bissonnette, Jan 8, 2004, in forum: Perl Misc
    Replies:
    9
    Views:
    231
    Marc Bissonnette
    Jan 13, 2004
  5. Bobby Chamness
    Replies:
    2
    Views:
    225
    Xicheng Jia
    May 3, 2007
Loading...

Share This Page