3

How do I concatenate multiple tag values using XPATH on vtd XML?

  <pre>
      <a>
        <b>
           <c>Hi</c>  
           <d>Vtd</d>
           <e>Users</e>
        </b>
      </a>
  </pre>

I have tried to use the following unsuccessfully.

    Xpath: concat(\a\b\c, \a\b\d, \a\b\e)   Result is : Hi Vtd Users

If I use concat with this XPATH, I receive the following error:

    Error "Function Expr can't eval to node set"
Jon7
  • 7,165
  • 2
  • 33
  • 39
Bhuvanesh
  • 31
  • 2

1 Answers1

1

You need to make sure that you are starting from the root node and that your axes are correct. The below XPath returns the desired output.

concat(pre/a/b/c, " ", pre/a/b/d, " ", pre/a/b/e)
Ryan Gates
  • 4,501
  • 6
  • 50
  • 90