PL/SQL: Count number of nodes in xml
问题 I am working with Oracle. Is there a way to count the number of nodes (including descendants) within an XML file using PL/SQL? I would like to be able to save the result as a variable to be used as an upper limit for a loop iterator. I have the following xml, and I want to count the number of nodes within the row node: <row> <date name="date1" id="101"></date> <element1 name="ele1" id="111"> <stuff></stuff> <stuff></stuff> <stuff></stuff> </element1> <element2 name="ele2" id="121"></element2>