Load children : doc « XQuery « XML






Load children



File: Data.xml


<order>
  <car dept="A">
    <number>1</number>
  </car>
  <car dept="B">
    <number>2</number>
  </car>
  <car dept="B">
    <number>3</number>
  </car>
  <car dept="C">
    <number>4</number>
  </car>
</order>


File: Query.xquery


doc("Data.xml")/order/car/number

Output:

 








Related examples in the same category

1.doc() funciton in for loop
2.Use doc() function to load XML document
3.Use doc() function to load xml docuCt