mlienlaff (AT) sii (DOT) cl (Miguel Lienlaff) wrote in message news:<daba365c.0402191329.55d13e0a (AT) posting (DOT) google.com>...
Quote:
Dear Oracle Community
Could you help me ???? !!!
I have to parse different xml documents and
save them in a set of tables in Oracle 9i.
A person told me that oracle is able to do that through
a mapping between xml and tables.
Do you now how to do it ?
Thanks in Advance
Miguel Lienlaff |
Hi!
Suppose your have your XML in CLOB variable,
than,
create table myxml
( x SYS.XMLTYPE )
declare
xml CLOB; -- contains XML
xmlt sys.XMLTYPE;
begin
xmlt := sys.XMLType.createXML(xml);
insert into myxml values (xmlt);
...
than you can work with this XML, stored in the database by means of
XMLDOM support in ORACLE:
declare
xmlt sys.XMLTYPE;
clob_xml CLOB;
parser XMLPARSER.Parser := XMLPARSER.NewParser;
sourceXML XMLDOM.DOMDocument;
begin
select xx into xmlt
from myxml;
clob_xml := xmlt.getClobVal();
xmlparser.setValidationMode(parser,FALSE);
XMLPARSER.ParseCLOB(parser, clob_xml);
sourceXML := XMLPARSER.GetDocument(parser);
...
Best regards, Igor Balakirev