Skip to Main Content

Integration

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!

Extract Embedded XML within XML using XSLT

user633446Jan 9 2015 — edited Feb 26 2020

Hi,

We have a unique scenario where our incoming payload is coming from Oracle Database table which has one column of CLOB type storing complete raw XML.

We need to extract this embedded raw XML and process it further, each XML has a unique XSD associated and we have that details in a separate column.

So our DBAdapter incoming payload looks like below

<rows>

<row>

<xml_xsd>xyz.xsd</xml_xsd>

<xml>RAW XML DATA</xml>

</row>

<row>

<xml_xsd>xyzv2.xsd</xml_xsd>

<xml>RAW XML DATA</xml>

</row>

<row>

<xml_xsd>xyzv2.xsd</xml_xsd>

<xml>RAW XML DATA</xml>

</row>

<row>

<xml_xsd>xyzv3.xsd</xml_xsd>

<xml>RAW XML DATA</xml>

</row>

</rows>

How can we leverage XSL Transformation to extract this embedded XML in each row? I need the each individual XML available for further mapping. I can split the payload using XPATH filtering per XSD, but not able to find a solution to parse the embedded XML and assign to a target schema?

Research done so far points to do two transformations to get resulting XML or using Saxon Parser if available and use the parse() extension.

Any other ideas/suggestions will be helpful. Challenge here is performance as i need to do this in bulk, will have many rows to process

Thanks in advance.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 10 2015
Added on Jan 9 2015
2 comments
1,348 views