A question about xml db

Source: Internet
Author: User
At the beginning, I encountered a weak problem. I hope you can give me some advice:
The problem is about oracle. I just started to learn oracle and encountered a problem. I read the oracle technical documentation a few days ago about XML DB. As mentioned in this article, to save an xml document to an XMLType table, you must first convert the xml document into an xmltype data. The original text is as follows:
To store an XML document in an XMLType table or column the XML document must first be converted into an XMLType instance. this is done using the different constructors provided by the XMLType datatype. for example, given a PL/SQL function called getCLOBDocument ():

Create or replace function getClobDocument (
Filename in varchar2,
Charset in varchar2 default NULL)
Return CLOB deterministic
Is
File bfile: = bfilename ('dir', filename );
CharContent CLOB: = '';
TargetFile bfile;
Lang_ctx number: = DBMS_LOB.default_lang_ctx;
Charset_id number: = 0;
Src_offset number: = 1;
Dst_offset number: = 1;
Warning number;
Begin
If charset is not null then
Charset_id: = NLS_CHARSET_ID (charset );
End if;
TargetFile: = file;
DBMS_LOB.fileopen (targetFile, DBMS_LOB.file_readonly );
DBMS_LOB.LOADCLOBFROMFILE (charContent, targetFile,
DBMS_LOB.getLength (targetFile), src_offset, dst_offset,
Charset_id, lang_ctx, warning );
DBMS_LOB.fileclose (targetFile );
Return charContent;
End;
/

Create directory on the server: create directory dir as 'C :\';
Put several xml documents under the Directory and execute: insert into xmltable values (XMLTYPE (getCLOBDocument ('books. xml ')));
The xml document can be inserted into the database. The problem now is: I don't know how to insert the xml document from the client to the oracle database on the server (windows server2003 on the server) what about unix servers.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.