troubleshooting Question

How to loop through the children nodes of an XML table with Oracle?

Avatar of Errang Genevre
Errang Genevre asked on
Oracle DatabaseDatabases
1 Comment1 Solution1872 ViewsLast Modified:

I'm trying to figure out how to loop through multiple child nodes of the same name in an XML table; like this:

            <interests>Sports</interes<wbr ></wbr>ts>
            <interests>Video Games</interests>

I would like to get the list of people who are interested in Sports, but when I try to get the people attribute; I get an error saying the XML node had to be unique and wouldn't work unless I use the specific number; at which point it becomes a little frustrating when the node isn't always in the same place every time.

Is there any smarter way to loop through the Oracle XML table programmatically with a query?

Appreciate any help!

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros