1

Can any one please let me know how can I access an array of elements to a property.

For example: I have an XML as said below

<a>
 <x>1</x>
 <x>2</x>
 <x>3</x>
 <x>4</x>
</a>

I want my property to be set as shown below:

 <x>1</x>
 <x>2</x>
 <x>3</x>
 <x>4</x>

when I try to access using //x with property type set to OM element or String I don't see the result as expected in my property.

Can any one please direct me with the right xpath to be used to see the desired outcome ?

Community
  • 1
  • 1
Shiv
  • 521
  • 2
  • 11
  • 27

1 Answers1

1

You should be able to use //a/child::node() XPath for this.

Please refer XPath to get all child nodes (elements, comments, and text) without parent

Hope this helps!!

/Harshana

Community
  • 1
  • 1
Harshana Martin
  • 757
  • 1
  • 4
  • 11