0

Hi I have a blob of xml..

<string>1</string>
<string>2</string>
<string>3</string>
<string>4</string>
<string>11</string>
<string>1211</string>
<string>12331</string>

how would I get all the values using xpath/xquery in SQL

Thanks

Lukas Eder
  • 211,314
  • 129
  • 689
  • 1,509
Andy
  • 1,183
  • 5
  • 17
  • 25

2 Answers2

1

The xpath //string will return all the values in the intire xml the xpath /string will return only the values in the root node.

And for using it in sql look at this post XPath to fetch SQL XML value

Community
  • 1
  • 1
Mattias Josefsson
  • 1,147
  • 1
  • 7
  • 22
0

in oracle database

you have XMLType (see this) data type..

by this datatype you can get all the value..

all the examples are there itself, please go through that site.

pratik garg
  • 3,282
  • 1
  • 17
  • 21