Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Count the maximum number of elements for a particular node

user4531996May 28 2013 — edited May 29 2013
Having this XML file:
<gifts>
<giftinfo gifter="SANTA CLAUS">
<Recipients>
<kid name="JOHN GOODBOY" />
<kid name="CLARK GETCOAL" />
</Recipients>
</giftinfo>
<giftinfo gifter="TOOTH FAIRY">
<Recipients>
<kid name="PAUL TOOTHLESS" />
</Recipients>
</giftinfo>
<giftinfo gifter="THREE WISE MEN">
<Recipients>
<kid name="TONNY CAMEL" />
<kid name="VICTOR HORSERIDER" />
<kid name="CHARLES DELEPHANT" />
</Recipients>
</giftinfo>
<giftinfo gifter="EASTER BUNNY">
<Recipients>
<kid name="JIMMY EGGHEAD" />
</Recipients>
</giftinfo>
</gifts>

I need to find what is the maximum number of "kid name"s under "giftinfo gifter".
For the example above, I would like to see "3".
Any hints would be appreciated.

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 26 2013
Added on May 28 2013
2 comments
1,639 views