Menu

Grab entire tag

Help
chyahoo
2011-12-02
2012-09-04
  • chyahoo

    chyahoo - 2011-12-02

    I have the following xml.

    This is the first part of the equation

    How do I grab everything in h4 as in "This is the first part of the equation"

    The code below doesn't seems to work.

    <var-def name="hdr"></var-def>

    <xpath expression="//h4 | //cite"></xpath>

     
  • Alex Wajda

    Alex Wajda - 2011-12-03

    Just "string(h4)". Or "data(//h4)" if you want a sequence.

     
  • chyahoo

    chyahoo - 2011-12-03

    Thanks for your reply.

    Do you mean:

    <var-def name="hdr"></var-def>

    <xpath filecontent"="" expression="string(h4)&gt;&lt;/p&gt; &lt;p&gt;&lt;var name="></xpath>

    thanks again.

     
  • chyahoo

    chyahoo - 2011-12-03

    I found the answer:

    <var-def name="hdr"></var-def>

    <xpath expression="fn:data(//h4)"></xpath>

    Thanks again for your lead.

    Cheers.

     

Log in to post a comment.