Updating counter in XQuery

后端 未结 7 1930
孤街浪徒
孤街浪徒 2020-12-10 13:39

I want to create a counter in xquery. My initial attempt looked like the following:

let $count := 0
for $prod in $         


        
相关标签:
7条回答
  • 2020-12-10 14:15

    I think you are looking for something like:

    XQUERY:

    for $x in (1 to 10)
    return
      <counter>{$x}</counter>
    

    OUTPUT:

    <counter>1</counter>
    <counter>2</counter>
    <counter>3</counter>
    <counter>4</counter>
    <counter>5</counter>
    <counter>6</counter>
    <counter>7</counter>
    <counter>8</counter>
    <counter>9</counter>
    <counter>10</counter>
    
    0 讨论(0)
提交回复
热议问题