I have various large xml files that describe images. I need to extract information from nodes and send them to different tables depending on the node itself.
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<metadata xml:lang="en">
<mdDateSt Sync="TRUE">20140909</mdDateSt>
<spdoinfo>
<rastinfo>
<rowcount>2864</rowcount>
<colcount>5256</colcount>
<rastxsz>100</rastxsz>
<rastysz>100</rastysz>
</rastinfo>
</spdoinfo>
In this case, I need to send the value in the <mdDatSt>
tag to one table and the values within <spdoinfo>
to another table combined into a row.
Is it possible to do this using an XSD within the database and if so, how would this be done? Also if an XSD is possible, what does the SQL statement look like for extracting the data?
Or do I need to use the xml.extract
function within oracle to parse the file itself.
No comments:
Post a Comment