Can anyone please tell how I can process complex XML in oracle? For e.g I have the XML below:
<?xml version="1.0" encoding="utf-8" ?>
<UserEmailPreferences>
<EmailOffering>
<EmailGroupID>1</EmailGroupID>
<EmailOfferingID>0</EmailOfferingID>
<Service>
<val>service-1</val>
<val>service-2</val>
</Service>
<Title>Clinical Focus</Title>
<SubscriptionOption>D</SubscriptionOption>
</EmailOffering>
</UserEmailPreferences>
<UserEmailPreferences>
<EmailOffering>
<EmailGroupID>1</EmailGroupID>
<EmailOfferingID>0</EmailOfferingID>
<Service>
<val>service-1</val>
</Service>
<Title>XYZ</Title>
<SubscriptionOption>D</SubscriptionOption>
</EmailOffering>
</UserEmailPreferences>
In the above XML, I have two <UserEmailPreferences> nodes. It can be two, three or whatever...That is dynamic.
In <UserEmailPreferences> node, I have <Service> block which is again dynamic for corresponding <EmailOffering> node.
Can anyone please help me how I can process such XML in Oracle?