Import XML file in Oracle XML DB Repository

99封情书 提交于 2019-12-08 12:24:30

问题


I am new to XML databases. I have the following XML file (employees.xml) :-

<?xml version="1.0"?>
<emps>
    <emp empno="1" deptno="10" ename="John"  salary="21000"/>
    <emp empno="2" deptno="10" ename="Jack" salary="310000"/>
    <emp empno="3" deptno="20" ename="Jill" salary="100001"/>
</emps>

I want to load it in my Oracle XML DB Repository (under "public" folder) so that I can access it later using XQJ. Oracle is locally installed in my machine. Any clues how to import the XML file ?


回答1:


The various technologies for loading XML Data into the tables are documented here.

Basically use the lobfile function in SQLLoader to get the file as a whole and insert it into your XML column.



来源:https://stackoverflow.com/questions/39369749/import-xml-file-in-oracle-xml-db-repository

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!