XDB.DBMS_XMLDOM crashes
Oracle 9.2.0.1.0
here's the test procedure
create table aclob (res clob);
create or replace procedure xmltest is
outDoc dbms_xmldom.DOMDocument;
outNode dbms_xmldom.DOMNode;
curNode dbms_xmldom.DOMNode;
xmlElem dbms_xmldom.DOMElement;
xmlText dbms_xmldom.DOMText;
cnt1 number;
cnt2 number;
outXML clob;
begin
dbms_lob.createtemporary(outXML, cache => true);
outDoc:=dbms_xmldom.newDOMDocument;
dbms_xmldom.setVersion(outDoc, '1.0');
dbms_xmldom.setCharset(outDoc, 'UTF8');
outNode:=dbms_xmldom.makeNode(outDoc);
xmlElem:=dbms_xmldom.createElement(outDoc, 'ROOT_NODE');
curNode:=dbms_xmldom.appendChild(outNode, dbms_xmldom.makeNode(xmlElem));
for cnt1 in 1 .. 100 loop
xmlElem:=dbms_xmldom.createElement(outDoc, 'SUBNODE1');
xmlText:=dbms_xmldom.createTextNode(outDoc, 'Subnode1 number '||cnt1);
curNode:=dbms_xmldom.appendChild(curNode, dbms_xmldom.makeNode(xmlElem));
curNode:=dbms_xmldom.appendChild(curNode, dbms_xmldom.makeNode(xmlText));
curNode:=dbms_xmldom.getParentNode(curNode);
for cnt2 in 1 .. 100 loop
xmlElem:=dbms_xmldom.createElement(outDoc, 'SUBNODE2');
xmlText:=dbms_xmldom.createTextNode(outDoc, 'Subnode2 number '||cnt2);
curNode:=dbms_xmldom.appendChild(curNode, dbms_xmldom.makeNode(xmlElem));
curNode:=dbms_xmldom.appendChild(curNode, dbms_xmldom.makeNode(xmlText));
curNode:=dbms_xmldom.getParentNode(curNode);
curNode:=dbms_xmldom.getParentNode(curNode);
end loop;
curNode:=dbms_xmldom.getParentNode(curNode);
end loop;
dbms_xmldom.writeToClob(outNode, outXML);
insert into aclob (res) values (outXML);
commit;
end xmltest; I need at least 10Mb of XML output but it crashes after 0,5Mb.
I appreciate any ideas about this matter, except splitting XML output into smaller parts.
Andrey,
You have version 9.2.0.1.0 Have you tried to upgrade to at least 9.2.0.3 this is the required version for XML DB.
Similar Messages
-
ORA-07445 and XDB.DBMS_XMLDOM
Hi,
I am receiving the following messages in the alert log:
Errors in file d:\oracle\ora10g\dumps\udump\prod_ora_5116.trc:
ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [0x3681AB1] [] [] [] []
ORA-06510: PL/SQL: unhandled user-defined exception
When I review the trace file, I see this:
*** SERVICE NAME:(SYS$USERS) 2006-07-26 13:06:10.246
*** SESSION ID:(80.5257) 2006-07-26 13:06:10.246
*** 2006-07-26 13:06:10.246
ksedmp: internal or fatal error
ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [0x3681AB1] [] [] [] []
ORA-06510: PL/SQL: unhandled user-defined exception
Current SQL statement for this session:
BEGIN Pack_Core_Api_Main.Proc_Core_Api_Main(:1,:2); END;
----- PL/SQL Call Stack -----
object line object
handle number name
8F21A048 4644 package body XDB.DBMS_XMLDOM
8F21A048 4667 package body XDB.DBMS_XMLDOM
8F196B1C 1516 package body OSIBANK.PACK_CORE_API_PERSONMAINT
8D03B614 361 package body OSIBANK.PACK_CORE_API_ROUTER
8D03B614 128 package body OSIBANK.PACK_CORE_API_ROUTER
8F239C6C 134 package body OSIBANK.PACK_CORE_API_MAIN
8DB36A64 1 anonymous block
--- snip ---
It seems to me the exception/error is occurring in package body XDB.DBMS_XMLDOM, but I am not certain.
My database is ORACLE V10.1.0.2.0.
Any thoughts?
Thank you,
BretI am in the process of trying to find out just that....where it's called from and what is sent to it. Here is the next bit from the trace file though. Please let me know if you'd like to see more of it.
Thank you,
Bret
*** SERVICE NAME:(SYS$USERS) 2006-07-26 13:06:10.246
*** SESSION ID:(80.5257) 2006-07-26 13:06:10.246
*** 2006-07-26 13:06:10.246
ksedmp: internal or fatal error
ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [0x3681AB1] [] [] [] []
ORA-06510: PL/SQL: unhandled user-defined exception
Current SQL statement for this session:
BEGIN Pack_Core_Api_Main.Proc_Core_Api_Main(:1,:2); END;
----- PL/SQL Call Stack -----
object line object
handle number name
8F21A048 4644 package body XDB.DBMS_XMLDOM
8F21A048 4667 package body XDB.DBMS_XMLDOM
8F196B1C 1516 package body OSIBANK.PACK_CORE_API_PERSONMAINT
8D03B614 361 package body OSIBANK.PACK_CORE_API_ROUTER
8D03B614 128 package body OSIBANK.PACK_CORE_API_ROUTER
8F239C6C 134 package body OSIBANK.PACK_CORE_API_MAIN
8DB36A64 1 anonymous block
----- Call Stack Trace -----
calling call entry argument values in hex
location type point (? means dubious value)
qmxdAdoptNode+1819 CALLrel qmxRemoveChild+0 1E237380 0 0 1E237380 995FD5C
1E237380 995B7AC 9958C40 0 1
qmxdplsdocadoptno CALLrel _qmxdAdoptNode+0 C57E6C0 995B7AC 0 9958C40
de+174
_spefcpfa+357 CALLreg 00000000
spefmccallstd+661 CALLrel spefcpfa+0
pextproc+88 CALLrel spefmccallstd+0 1F26D450 1F26D380 1F26D248
1F26D1C0 A26B15C
peftrusted+138 CALLrel pextproc+0 1F26D450 1F26D380 1F26D248
1F26D1C0
_psdexsp+115 CALLreg 00000000 0
_rpiswu2+368 CALLreg 00000000 1F26D15C
psdextp+439 CALLrel rpiswu2+0 99890D4C 27 1F26D110 2
1F26D0F4 27 1F26D130 0
214B410 0 1F26D15C 0
_pefccal+361 CALLreg 00000000 1F26D818 1F26D380 1F26D248 0
20003 1F26D450 60B103F0
pefcal+125 CALLrel pefccal+0 1E237380
pevmFCAL+191 CALLrel _pefcal+0
pfrinstrFCAL+70 CALLrel pevmFCAL+0
pfrrunno_tool+51 CALL??? 00000000
pfrrun+1834 CALLrel pfrrun_no_tool+0 D56E5A8 8EAD2CFA D56E5E4
plsqlrun+1051 CALLrel _pfrrun+0 D56E5A8
peicnt+179 CALLrel plsql_run+0 D56E5A8 1 0
kkxexe+477 CALLrel peicnt+0
opiexe+4896 CALLrel kkxexe+0 8DB36A64
kpoal8+1705 CALLrel opiexe+0 49 3 1F26E070
_opiodr+977 CALLreg 00000000 5E 14 1F26E7D0
_ttcpip+1827 CALLreg 00000000 5E 14 1F26E7D0 0
_opitsk+1098 CALL??? 00000000
opiino+938 CALLrel opitsk+0 0 0 1E23DD30 97EFDF8 B9 0
_opiodr+977 CALLreg 00000000 3C 4 1F26FBC0
opidrv+479 CALLrel opiodr+0 3C 4 1F26FBC0 0
sou2o+45 CALLrel opidrv+0 3C 4 1F26FBC0
opimai+237 CALLrel sou2o+0
OracleThreadStart@ CALLrel opimai+0
4+899
77E66060 CALLreg 00000000
--------------------- Binary Stack Dump ---------------------
-- snip --- -
Dbms_xmldom package results in ORA-31020
Hi,
I have the following procedure which compiles correct:
CREATE OR REPLACE procedure vbk_selproc_doc is
queryctx dbms_xmlquery.ctxtype;
result varchar2(30000);
header varchar2(1000);
footer varchar2(1000);
body varchar2(20000);
line VARCHAR2(2000);
var XMLtype;
doc dbms_xmldom.domdocument;
docelem dbms_xmldom.domelement;
node dbms_xmldom.domnode;
childnode dbms_xmldom.domnode;
nodelist dbms_xmldom.domnodelist;
buf varchar2(30000);
begin
queryctx := dbms_xmlquery.newcontext('select * from jobs');
dbms_xmlquery.setrowsettag(queryctx, 'opdracht-aanbieding');
dbms_xmlquery.setrowtag(queryctx, 'opdracht');
dbms_xmlquery.settagcase(queryctx, 1);
dbms_xmlquery.setrowidattrName(queryctx, null);
header := '<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>';
body := dbms_xmlquery.getxml(queryctx);
var := XMLTYPE(body);
doc := dbms_xmldom.newdomdocument(var);
docelem := dbms_xmldom.getdocumentelement(doc);
nodelist := dbms_xmldom.getelementsbytagname(docelem, 'NAME');
node := dbms_xmldom.item(nodelist, 0);
childnode := dbms_xmldom.getfirstchild(node);
dbms_xmldom.writetobuffer(childnode, buf);
dbms_output.put_line('First Child = ' || buf);
footer := '</SOAP-ENV:Body>
</SOAP-ENV:Envelope>' || chr(10);
result := header || ' ' || body || ' ' || footer;
loop
exit when result is null;
line := substr(result, 1, instr(result, chr(10))-1);
dbms_output.put_line(line);
result := substr(result, instr(result, chr(10)) +1 );
end loop;
dbms_xmlquery.closecontext(queryctx);
end;
When executing i get the following error:
SQL> exec vbk_selproc_doc;
BEGIN vbk_selproc_doc; END;
FOUT in regel 1:
.ORA-31020: The operation is not allowed, Reason: Invalid pl/sql DOM Node hdl
ORA-06512: at "XDB.DBMS_XMLDOM", line 715
ORA-06512: at "XDB.DBMS_XMLDOM", line 735
ORA-06512: at "FWADMIN.VBK_SELPROC_DOC", line 48
ORA-06512: at line 1
What is wrong?
Regards,
JoshuaI get the error on:
dbms_xmldom.writetobuffer(childnode, buf);
or when i use dbms_xmldom.removechild(nodelist, childnode) -
DBMS_XMLDOM.WRITETOFILE errors
C'mon then chaps (and chapesses)...
I've had DBMS_XMLDOM.WRITETOFILE working before but for some reason I just can't seem to get it to work again. (Using Oracle 10g R2)
What am I doing wrong. It's bound to be something right in front of me, but I just can't see it.
create or replace directory utl_data as 'C:\';
declare
xd DBMS_XMLDOM.DOMDocument;
xt XMLTYPE;
CURSOR cur_xml IS
select xmlelement("fred", 'fred') from dual;
begin
OPEN cur_xml;
FETCH cur_xml INTO xt;
CLOSE cur_xml;
xd := DBMS_XMLDOM.NewDOMDocument(xt);
DBMS_XMLDOM.WRITETOFILE(xd, 'C:\FRED.XML');
end;
ORA-29280: invalid directory path
ORA-06512: at "SYS.UTL_FILE", line 33
ORA-06512: at "SYS.UTL_FILE", line 436
ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 217
ORA-29280: invalid directory path
ORA-29280: invalid directory path
ORA-06512: at "XDB.DBMS_XMLDOM", line 4416
ORA-06512: at line 12Well that's very nice of you to answer my thread after a year, but I already know about using directory objects now.
I'm not quite sure what you are trying to show with you examples, but good luck to you anyway. -
10.2: loading DBMS_XMLDOM package
I'm getting errors of the form identifier 'DBMS_XMLDOM.DOMNAMEDNODEMAP' must be declared when I run my stored procedure.
What script needs to be run in Oracle 10g to create this package?I ran that, and that gives this error - do we need to create an xdb user? Is there a stock script for creating this user?
SQL> start dbmsxmld.sql;
CREATE OR REPLACE PACKAGE xdb.dbms_xmldom AUTHID CURRENT_USER IS
ERROR at line 1:
ORA-01435: user does not exist
No errors.
Synonym created.
Synonym created.
Synonym created.
GRANT EXECUTE ON xdb.dbms_xmldom TO PUBLIC
ERROR at line 1:
ORA-04042: procedure, function, package, or package body does not exist
GRANT EXECUTE ON sys.xmldom TO PUBLIC
ERROR at line 1:
ORA-04045: errors during recompilation/revalidation of SYS.XMLDOM
ORA-00980: synonym translation is no longer valid
ORA-00980: synonym translation is no longer valid
No errors.
SQL> -
Reg :DBMS_XMLDOM.DOMDocument Error
Hi all,
I tried to create xml document in the C Drive .
I Created Directory like :
create or replace directory ctemp1 as 'C:\';
GRANT ALL ON DIRECTORY ctemp1 to public;
grant read,write on directory ctemp1 to public;
The code is :
DECLARE
doc DBMS_XMLDOM.DOMDocument;
xdata XMLTYPE;
cursor XMLCUR is select SYS_XMLGEN(XMLAGG(XMLELEMENT("EMPNO", ename))) FROM EMP;
Cursor xmlCurdate is
select SYS_XMLGen(
XMLELEMENT(NAME "UTIMEID",
XMLATTRIBUTES (to_char((sysdate - 1),'yyyymmdd') as "uid",
to_char((sysdate - 1),'mm/dd/yyyy (') || rtrim(to_char((sysdate - 1),'Day')) || ')' as "uiddesc")),
sys.xmlgenformatType.createFormat('UPDATED-XML') ) from dual;
BEGIN
OPEN xmlcur;
FETCH xmlcur INTO xdata;
CLOSE xmlcur;
doc := DBMS_XMLDOM.NewDOMDocument(xdata);
DBMS_XMLDOM.WRITETOFILE(doc, 'ctemp1'||'\'||'alert.xml');
OPEN xmlcurdate;
FETCH xmlcurdate INTO xdata;
CLOSE xmlcurdate;
doc := DBMS_XMLDOM.NewDOMDocument(xdata);
DBMS_XMLDOM.WRITETOFILE(doc, 'ctemp1'||'\'||'updated.xml');
END;
Am Getting the Error like :
Error starting at line 8 in command:
DECLARE
doc DBMS_XMLDOM.DOMDocument;
xdata XMLTYPE;
cursor XMLCUR is select SYS_XMLGEN(XMLAGG(XMLELEMENT("EMPNO", ename))) FROM EMP;
Cursor xmlCurdate is
select SYS_XMLGen(
XMLELEMENT(NAME "UTIMEID",
XMLATTRIBUTES (to_char((sysdate - 1),'yyyymmdd') as "uid",
to_char((sysdate - 1),'mm/dd/yyyy (') || rtrim(to_char((sysdate - 1),'Day')) || ')' as "uiddesc")),
sys.xmlgenformatType.createFormat('UPDATED-XML') ) from dual;
BEGIN
OPEN xmlcur;
FETCH xmlcur INTO xdata;
CLOSE xmlcur;
doc := DBMS_XMLDOM.NewDOMDocument(xdata);
DBMS_XMLDOM.WRITETOFILE(doc, 'ctemp1'||'\'||'alert.xml');
OPEN xmlcurdate;
FETCH xmlcurdate INTO xdata;
CLOSE xmlcurdate;
doc := DBMS_XMLDOM.NewDOMDocument(xdata);
DBMS_XMLDOM.WRITETOFILE(doc, 'ctemp1'||'\'||'updated.xml');
END;
Error report:
ORA-29280: invalid directory path
ORA-06512: at "SYS.UTL_FILE", line 33
ORA-06512: at "SYS.UTL_FILE", line 436
ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 217
ORA-29280: invalid directory path
ORA-29280: invalid directory path
ORA-06512: at "XDB.DBMS_XMLDOM", line 4416
ORA-06512: at line 16
29280. 00000 - "invalid directory path"
*Cause: A corresponding directory object does not exist.
*Action: Correct the directory object parameter, or create a corresponding
directory object with the CREATE DIRECTORY command.
Please help on this .
Thanks in advence .When you create objects on the database (tables, views, directories etc.) then by default they are stored in the data dictionary in UPPER case (unless you surround the name with double quotes which is poor practice).
So, in your DBMS_XMLDOM.WRITETOFILE call you need to specify the directory name in UPPER case...
DBMS_XMLDOM.WRITETOFILE(doc, 'CTEMP1'||...... simple as that. ;) -
Error while generating an XML File.
Hello All,
Help me regarding My Doubt.
I have created a Procedure Which will create an XML File.
I am Using the XMLDOM Package to create the File.
I am passing the XMLFILE to a CLOB Field.
XMLDOM.writeToClob(DOC, P_XMLFILE);
But When I am Running the Procedure I am getting the List of Errors.
ORA-29280: invalid directory path
ORA-06512: at "SYS.UTL_FILE", line 33
ORA-06512: at "SYS.UTL_FILE", line 436
ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 217
ORA-29280: invalid directory path
ORA-29280: invalid directory path
ORA-06512: at "XDB.DBMS_XMLDOM", line 4416
ORA-06512: at "K5ESK_LDB2.PR_CREATE_XMLFILE", line 26
I dont know the Reason why the Errors are Comming.
Does It Require I should change the System Setting to Make sure that XMLDOM will work ProperlyDear Member,
The Below is the Code I am using.
CREATE OR REPLACE PROCEDURE pr_create_xmlfile(P_XMLFILE IN OUT CLOB)
doc xmldom.DOMDocument;
main_node xmldom.DOMNode;
root_node xmldom.DOMNode;
user_node xmldom.domnode;
item_node xmldom.domnode;
root_elmt xmldom.DOMElement;
item_elmt xmldom.DOMElement;
item_text xmldom.domtext;
CURSOR get_data(p_deptno IN NUMBER)
IS
SELECT EMPNO,
ENAME,
DEPTNO,
ROWNUM Rec_Num
FROM emp WHERE deptno = p_deptno;
BEGIN
doc := xmldom.newdomdocument;
-- Create the Main Node
main_node := xmldom.makenode(doc);
-- Create the Root Element.
root_elmt := xmldom.createelement(doc,'EMPSET');
-- Attach this Root Element to the Main Node.
root_node := xmldom.appendchild(main_node,xmldom.makenode(root_elmt));
xmldom.writetofile(doc,'c:\temp\test.xml');
xmldom.freedocument(doc);
FOR rec_data IN get_data(10) LOOP
<EMP num="1">
<EMP_NO>7782</EMP_NO>
<NAME>CLARK</NAME>
<DEPT_NO>10</DEPT_NO>
</EMP>
-- Create a Main Element
item_elmt := xmldom.createelement(doc,'EMP');
-- Creating an Attribute to the Emp Element
xmldom.setattribute(item_elmt,'Num',rec_data.rec_num);
-- Attaching this EMP Element as Child Record to the Root Node.
user_node := xmldom.appendchild(root_node,xmldom.makenode(item_elmt));
-- Creating another EMP_NO Element
item_elmt := xmldom.createelement(doc,'EMP_NO');
-- Attaching the EMP_NO Element to the EMP Element as Child Element
item_node := xmldom.appendchild(user_node,xmldom.makenode(item_elmt));
-- Creating a Text Node with the Empno data
item_text := xmldom.createtextnode(doc,rec_data.empno);
-- Attaching this Text Node as Child to the EMP_NO Element.
item_node := xmldom.appendchild(item_node,xmldom.makenode(item_text));
END LOOP;
XMLDOM.writeToClob(DOC, P_XMLFILE);
XMLDOM.FREEDOCUMENT(DOC);
Errors
ORA - 29280 --> A corresponding directory object does not exist.
Action --> Correct the directory object parameter, or create a corresponding directory object with the
CREATE DIRECTORY command
ORA - 06512 --> Backtrace message as the stack is unwound by unhandled exceptions
Action --> Fix the problem causing the exception or write an exception handler for this condition.
END; -
How to add image in virtual dir / i/ 11g when using the embedded gateway
Hi,
Does somebody knows how to 'simple' import a file or directory
into the /images/ or /i/ directory created by APEX without tricks like in How I added a new image to APEX in 11g when using the embedded gateway.
when using Database 11g with the embedded gateway. with webdav of ftp.
When I use the url http://localhost/images
I need to logon.
There is not 1 username/password that I can use. I tried all.
When I try http://localhost/i/16admin.gif then the gif is shown.
I must be something with ACL's or DBMS_EPG or maybe the default port 80 that I use?
My configuration is
Doing 11.1.0.6.0 checks
############# Status/Version #############
XDB Status is: VALID at version 11.1.0.6.0
############# OTHER DATABASE FEATURES #############
Oracle Application Express is VALID at version 3.1.2.00.02
OWB is VALID at version 11.1.0.6.0
Oracle Enterprise Manager is VALID at version 11.1.0.6.0
Oracle Ultra Search is VALID at version 11.1.0.6.0
OLAP Catalog is VALID at version 11.1.0.6.0
Spatial is VALID at version 11.1.0.6.0
Oracle Multimedia is VALID at version 11.1.0.6.0
Oracle XML Database is VALID at version 11.1.0.6.0
Oracle Text is VALID at version 11.1.0.6.0
Oracle Expression Filter is VALID at version 11.1.0.6.0
Oracle Rules Manager is VALID at version 11.1.0.6.0
Oracle Workspace Manager is VALID at version 11.1.0.6.0
Oracle Database Catalog Views is VALID at version 11.1.0.6.0
Oracle Database Packages and Types is VALID at version 11.1.0.6.0
JServer JAVA Virtual Machine is VALID at version 11.1.0.6.0
Oracle XDK is VALID at version 11.1.0.6.0
Oracle Database Java Packages is VALID at version 11.1.0.6.0
OLAP Analytic Workspace is VALID at version 11.1.0.6.0
Oracle OLAP API is VALID at version 11.1.0.6.0
############# XDBCONFIG INFORMATION #############
acl-max-age= = = 15
acl-cache-size= = = 32
case-sensitive= = = true
call-timeout= = = 6000
max-link-queue= = = 65536
max-session-use= = = 100
persistent-sessions= = = false
default-lock-timeout= = = 3600
xdbcore-logfile-path= = = /sys/log/xdblog.xml
xdbcore-log-level= = = 0
resource-view-cache-size= = = 1048576
extension= = = au
mime-type= = = audio/basic
extension= = = avi
mime-type= = = video/x-msvideo
extension= = = bin
mime-type= = = application/octet-stream
extension= = = bmp
mime-type= = = image/bmp
extension= = = css
mime-type= = = text/css
extension= = = doc
mime-type= = = application/msword
extension= = = eml
mime-type= = = message/rfc822
extension= = = gif
mime-type= = = image/gif
extension= = = htm
mime-type= = = text/html
extension= = = html
mime-type= = = text/html
extension= = = jpe
mime-type= = = image/jpeg
extension= = = jpeg
mime-type= = = image/jpeg
extension= = = jpg
mime-type= = = image/jpeg
extension= = = js
mime-type= = = application/x-javascript
extension= = = jsp
mime-type= = = text/html
extension= = = mid
mime-type= = = audio/mid
extension= = = mov
mime-type= = = video/quicktime
extension= = = movie
mime-type= = = video/x-sgi-movie
extension= = = mp3
mime-type= = = audio/mpeg
extension= = = mpe
mime-type= = = video/mpg
extension= = = mpeg
mime-type= = = video/mpg
extension= = = mpg
mime-type= = = video/mpg
extension= = = msa
mime-type= = = application/x-msaccess
extension= = = msw
mime-type= = = application/x-msworks-wp
extension= = = pcx
mime-type= = = application/x-pc-paintbrush
extension= = = pdf
mime-type= = = application/pdf
extension= = = png
mime-type= = = image/png
extension= = = ppt
mime-type= = = application/vnd.ms-powerpoint
extension= = = ps
mime-type= = = application/postscript
extension= = = qt
mime-type= = = video/quicktime
extension= = = ra
mime-type= = = audio/x-realaudio
extension= = = ram
mime-type= = = audio/x-realaudio
extension= = = rm
mime-type= = = audio/x-realaudio
extension= = = rtf
mime-type= = = application/rtf
extension= = = rv
mime-type= = = video/x-realvideo
extension= = = sgml
mime-type= = = text/sgml
extension= = = svg
mime-type= = = image/svg+xml
extension= = = tif
mime-type= = = image/tiff
extension= = = tiff
mime-type= = = image/tiff
extension= = = txt
mime-type= = = text/plain
extension= = = url
mime-type= = = text/plain
extension= = = vrml
mime-type= = = x-world/x-vrml
extension= = = wav
mime-type= = = audio/wav
extension= = = wpd
mime-type= = = application/wordperfect5.1
extension= = = xls
mime-type= = = application/vnd.ms-excel
extension= = = xml
mime-type= = = text/xml
extension= = = xsd
mime-type= = = text/xml
extension= = = xsl
mime-type= = = text/xml
extension= = = zip
mime-type= = = application/x-zip-compressed
extension= = = htc
mime-type= = = text/x-component
extension= = = xbl
mime-type= = = text/xml
extension= = = en
lang= = = english
extension= = = gzip
encoding= = = zip file
extension= = = tar
encoding= = = tar file
session-pool-size= = = 50
session-timeout= = = 6000
ftp-port= = = 0
ftp-listener= = = local_listener
ftp-protocol= = = tcp
logfile-path= = = /sys/log/ftplog.xml
log-level= = = 0
session-timeout= = = 6000
buffer-size= = = 8192
http-port= = = 80
http-listener= = = local_listener
http-protocol= = = tcp
max-http-headers= = = 64
max-header-size= = = 16384
max-request-body= = = 2000000000
session-timeout= = = 6000
server-name= = = XDB HTTP Server
logfile-path= = = /sys/log/httplog.xml
log-level= = = 0
servlet-realm= = = Basic realm="XDB"
welcome-file= = = index.html
welcome-file= = = index.htm
servlet-pattern= = = /Test
servlet-name= = = TestServlet
servlet-pattern= = = /oradb/*
servlet-name= = = DBURIServlet
servlet-pattern= = = /orarep/*
servlet-name= = = ReportFmwkServlet
servlet-pattern= = = /i/*
servlet-name= = = PublishedContentServlet
servlet-pattern= = = /apex/*
servlet-name= = = APEX
servlet-pattern= = = /images/*
servlet-name= = = IMAGES
servlet-name= = = TestServlet
servlet-language= = = Java
display-name= = = XDB Test Servlet
description= = = A servlet to test the internals of the XDB Servlet API
servlet-class= = = xdbtserv
servlet-schema= = = xdb
servlet-name= = = DBURIServlet
servlet-language= = = C
display-name= = = DBURI
description= = = Servlet for accessing DBURIs
role-name= = = authenticatedUser
role-link= = = authenticatedUser
servlet-name= = = ReportFmwkServlet
servlet-language= = = C
display-name= = = REPT
description= = = Servlet for accessing reports
role-name= = = authenticatedUser
role-link= = = authenticatedUser
servlet-name= = = PublishedContentServlet
servlet-language= = = C
display-name= = = Unauthenticated File Access Servlet
description= = = Servlet for files for unauthenticated users
param-name= = = RootFolder
param-value= = = /images
description= = = RootFolder
role-name= = = anonymousServletRole
role-link= = = anonymousServletRole
servlet-name= = = APEX
servlet-language= = = PL/SQL
display-name= = = APEX
database-username= = = ANONYMOUS
default-page= = = apex
document-table-name= = = wwv_flow_file_objects$
document-path= = = docs
document-procedure= = = wwv_flow_file_mgr.process_download
nls-language= = = american_america.al32utf8
request-validation-function= = = wwv_flow_epg_include_modules.authorize
role-name= = = anonymousServletRole
role-link= = = anonymousServletRole
servlet-name= = = IMAGES
servlet-language= = = PL/SQL
display-name= = = IMAGES
database-username= = = APS
role-name= = = anonymousServletRole
role-link= = = anonymousServletRole
allow-mechanism= = = basic
nonce-timeout= = = 300
xdbcore-xobmem-bound= = = 1024
xdbcore-loadableunit-size= = = 16
acl-evaluation-method= = = ace-order
############# XMLTYPE Tables #############
XDB has 1 XMLTYPE TABLES stored as CLOB
XDB has 24 XMLTYPE TABLES stored as OBJECT-RELATIONAL
XDB has 11 XMLTYPE TABLES stored as BINARY
############# XMLTYPE Columns #############
XDB has 3 XMLTYPE Columns stored as CLOB
MDSYS has 24 XMLTYPE Columns stored as CLOB
SYS has 1 XMLTYPE Columns stored as CLOB
ORDSYS has 9 XMLTYPE Columns stored as CLOB
############# XMLTYPE Views #############
############# XMLTYPE INDEXES #############
XDB has 1 XMLTYPE Indexes of type CSX
############# Items built with XML API's #############
PACKAGE BODY FLOWS_030100.WWV_FLOW_XLIFF
PACKAGE BODY FLOWS_030000.WWV_FLOW_XLIFF
PACKAGE BODY MDSYS.SDO_WFS_PROCESS
PACKAGE BODY EXFSYS.DBMS_RLMGR_DR
PACKAGE BODY FLOWS_030100.WWV_FLOW_DATALOAD_XML
PACKAGE BODY MDSYS.SDO_OLS
PACKAGE BODY FLOWS_030000.WWV_FLOW_DATALOAD_XML
PACKAGE BODY FLOWS_030100.WWV_FLOW_XLIFF
PACKAGE BODY FLOWS_030000.WWV_FLOW_XLIFF
PACKAGE BODY EXFSYS.DBMS_RLMGR_DR
PACKAGE BODY XDB.DBMS_XSLPROCESSOR
PACKAGE BODY XDB.DBMS_XMLPARSER
PACKAGE BODY FLOWS_030100.WWV_FLOW_XLIFF
PACKAGE BODY XDB.DBMS_CSX_INT
PACKAGE BODY FLOWS_030000.WWV_FLOW_XLIFF
PACKAGE BODY EXFSYS.DBMS_RLMGR_DR
PACKAGE BODY XDB.DBMS_XDB
PACKAGE BODY XDB.DBMS_XDBRESOURCE
PACKAGE BODY XDB.DBMS_XMLDOM
PACKAGE XDB.DBMS_XSLPROCESSOR
PACKAGE XDB.DBMS_XMLPARSER
PACKAGE XDB.DBMS_XDBRESOURCE
PACKAGE BODY XDB.DBMS_XMLDOM
PACKAGE BODY XDB.DBMS_XMLINDEX
PACKAGE BODY XDB.DBMS_XMLPARSER
PACKAGE BODY XDB.DBMS_XMLPARSER
PACKAGE BODY XDB.DBMS_XMLSCHEMA
PACKAGE BODY XDB.DBMS_XMLSCHEMA
PACKAGE BODY XDB.DBMS_XMLSCHEMA_INT
PACKAGE BODY XDB.DBMS_XMLTRANSLATIONS
PACKAGE BODY XDB.DBMS_XSLPROCESSOR
PACKAGE BODY XDB.DBMS_XMLPARSER
PACKAGE BODY XDB.DBMS_CSX_INT
PACKAGE BODY XDB.DBMS_XMLDOM
PACKAGE BODY XDB.DBMS_XSLPROCESSOR
############# XML SCHEMAS #############
MDSYS has 4 registered.
EXFSYS has 2 registered.
ORDSYS has 17 registered.
XDB has 25 registered.
SYS has 43 registered.
############# Repository Resources #############
MDSYS has 9 resources.
EXFSYS has 3 resources.
ORDSYS has 20 resources.
XDB has 28 resources.
SYS has 12634 resources.
############# Network ACLs Configured #############
mail.4aps.be has network acls configured for ports 25 through 25
* has network acls configured for ports through
* has network acls configured for ports through
############# DBMS_EPG DAD USAGE #############
APEX
IMAGESHi Jules,
You need a user with XDBADMIN rights to access the WebDav. Once you have access, you can open the URL as webfolder (in IE).
Regards,
Christian -
Hi,
I want to parse a xml file by plsql procedure and use it by xmldom package.
It working perfectly when I use oracle 9.2.05, but I can't use file greater than 10926 bytes when I use oracle 10.1.0.3 because this error stack appear.
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00200: could not convert from encoding UTF-8 to UCS2
Error at line 630
ORA-06512: at "XDB.DBMS_XMLDOM", line 4180
ORA-06512: at "XDB.DBMS_XMLDOM", line 4205
ORA-06512: at "WIPO.TESTXML", line 191
ORA-06512: at line 1
Code on line 191 is:
nl := xmldom.getElementsByTagName(doc, '*');
When I use file less than 10926 bytes then 10g working like 9i database.
Can anybody know what's wrong?
thanks
MilanHi,
I want to parse a xml file by plsql procedure and use it by xmldom package.
It working perfectly when I use oracle 9.2.05, but I can't use file greater than 10926 bytes when I use oracle 10.1.0.3 because this error stack appear.
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00200: could not convert from encoding UTF-8 to UCS2
Error at line 630
ORA-06512: at "XDB.DBMS_XMLDOM", line 4180
ORA-06512: at "XDB.DBMS_XMLDOM", line 4205
ORA-06512: at "WIPO.TESTXML", line 191
ORA-06512: at line 1
Code on line 191 is:
nl := xmldom.getElementsByTagName(doc, '*');
When I use file less than 10926 bytes then 10g working like 9i database.
Can anybody know what's wrong?
thanks
Milan -
XML Namespace problem in XMLType
Hi,
I am getting this error, if anyone has any information about it please let me know.
extract() returns the following error when a reserverd xml namespace 'xml:lang' is used in the xml document. if the namespace is removed it dosent give error.
If this is not an error, please let me know how to workaround it.
Thanks,
Divakar.
ERROR at line 1:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00233: namespace prefixes starting with "xml" are reserved
Error at line 71
ORA-06512: at "XDB.DBMS_XMLDOM", line 3508
ORA-06512: at "XDB.DBMS_XMLDOM", line 3551
ORA-06512: at "OPS$DTANJORE.CDR_CDISC_TOPIC3", line 44
ORA-06512: at line 1Hi Vijaykumar,
Thanks for your reply.
But it is standard proxy structure, Is it fine to modify this ?
& it is proxy, so we have to regenerate it in SRM also.
is it fine ?
Study SAP -
Dbms_xslprocessor return node copy
Recently I converted my code from sys.xmldom and sys.xslprocessor packages to xdb.dbms_xmldom and xdb.dbms_xslprocessor packages. And what supprised me is that dbms_xslprocessor.selectSingleNode() returns a copy of the selected node not a reference. My code was able to modify the xml tree before now failed. Is there a fix to this bug? I am using 9.2.0.5 patch. Thanks.
Hi,
Even I tried with variable based indexing
But for me its returing all nodes irrespective of index varible value -
Maybe I've missed something obvious but I can't get the XML stuff to work.
I've got a table with CLOBs containing XML text. I would like to use a proc to alter the XML and store it in another CLOB.
So:
DECLARE
v_source CLOB;
v_document XMLType;
v_dom_doc dbms_xmldom.DOMDocument;
v_result CLOB;
myParser dbms_xmlparser.Parser;
BEGIN
v_result := EMPTY_CLOB();
SELECT content INTO v_source
FROM user_content WHERE id = 1;
myParser := dbms_xmlparser.newParser;
dbms_xmlparser.setValidationMode(myParser, FALSE);
dbms_xmlparser.parseClob(myParser, v_source);
v_dom_doc := dbms_xmlparser.getDocument(myParser);
dbms_xmldom.writeToClob(v_dom_doc, v_result);
commit;
END;
This fails like this:
ERROR at line 1:
ORA-00600: internal error code, arguments: [kghsccread1], [18805], [18804], [],
ORA-06512: at "XDB.DBMS_XMLDOM", line 3734
ORA-06512: at "XDB.DBMS_XMLDOM", line 3752
ORA-06512: at line 15
I can't see anything wrong with it.Can anyone give me a clue?
Thanks.
Nic FerrierThe documents I'm using seem to fail erratically (I've put an example at the end of the post).
The parser seems to be broken as regards tabs at the beginning of a line, but it also seems to be broken in other ways.
I tried to parse the document below and it works as long as the <test> root element no longer wraps the <precedent> element. When you put the <test> element in the parser fails when there are TABs at the start of certain lines.
It makes me VERY unconfident about the PL/SQL parser.
Here's my example document (but the tabs are probably dropped):
<?xml version="1.0"?>
<test>
<precedent-intro>
<title>Drafting Guide</title>
<para-text>This is a lease for a lock-up shop within a modern shopping centre, which would be on standard terms. The landlord provides services to the shop and more widely for the visitors to the centre. The tenant pays a service charge which contributes to the cost of all the services. An unusual provision is the landlord's obligation to consult all the centre's tenants about the opening hours, services and advertising.</para-text>
<para-text>The lease provides that the landlord has no continuing liability after parting with its interest in the premises, but the landlord covenants not to assign its interest in part only of centre. Without an express provision about continuing liability, the landlord is only released by serving notice on the tenant. That gives the tenant the opportunity to apply to the court to object (<legis-cite type='statute' id='1033194357' locsrc='1033193166' title='Landlord and Tenant (Covenants) Act' date='1995' docid='a1995c30' dbid='master' validated='yes'>
<legis-name href='root'>Landlord and Tenant (Covenants) Act 1995</legis-name>
, <legis-ref href='s6'>ss. 6</legis-ref>
, <legis-ref href='s8'>8</legis-ref>
</legis-cite>
). However, if the landlord assigned its interest in part of the centre, it would no longer be liable on its covenants relating to that part. That could make the provisions about services unworkable. See <emphasis type='normal'>Leasehold Law</emphasis>
, para. 1.016.</para-text>
<para-text>The tenant is free to dispose of the lease, with consent which the landlord is not entitled to withhold unreasonably, but is not entitled to sub-let part only of the unit. This preserves the intended subdivision of the centre and then prevents the situation at the end of the lease where a sub-tenant of part only of the unit is entitled to a statutory renewal of the lease of that part, so that the landlord finds itself obliged to let a divided property to more than one tenant (<legis-cite type='statute' id='1033194394' locsrc='1033193101' title='Landlord and Tenant Act' date='1954' docid='a1954(2&3Eliz2)c56' dbid='master' validated='yes'>
<legis-name href='root'>Landlord and Tenant Act 1954</legis-name>
, <legis-ref href='s23'>s. 23</legis-ref>
, <legis-ref href='sch6'>Sched. 6</legis-ref>
</legis-cite>
; although if the head tenant applies to renew the lease of part of the premises, he can be obliged to take a new lease of the whole: <emphasis type='normal'>ibid.</emphasis>
<legis-cite type='statute' id='1033200923' locsrc='1033193101' title='Landlord and Tenant Act' date='1954' docid='a1954(2&3Eliz2)c56' dbid='master' validated='yes'>
<legis-ref href='s32(2)'>s. 32(2)</legis-ref>
</legis-cite>
). See <emphasis type='normal'>Leasehold Law</emphasis>
, paras 4.285, 5.047.</para-text>
<para-text>On an assignment of the lease, the landlord can require the assignor to enter into an authorised guarantee agreement so that he continues to have responsibility for the performance of the lease covenants until the lease is further assigned (<legis-cite type='statute' id='1033194441' locsrc='1033193166' title='Landlord and Tenant (Covenants) Act' date='1995' docid='a1995c30' dbid='master' validated='yes'>
<legis-name href='root'>Landlord and Tenant (Covenants) Act 1995</legis-name>
, <legis-ref href='s16'>s. 16</legis-ref>
</legis-cite>
). See <emphasis type='normal'>Leasehold Law</emphasis>
, para. 4.330.</para-text>
<para-text>The tenant covenants to keep the premises open for business during the centre's general opening hours. The landlord will not be able to obtain an order of specific performance to enforce this (<case-cite type='ukcase' id='1033194450' locsrc='new' party1='Cooperative Insurance Society Ltd' party2='Argyll Stores (Holdings) Ltd' reference='[1998] A.C. 1' validated='yes' dbid='master'>
<casename italic='1'>
<party1>Cooperative Insurance Society Ltd</party1>
v. <party2>Argyll Stores (Holdings) Ltd</party2>
</casename>
<case-ref>[1998] A.C. 1</case-ref>
</case-cite>
). See <emphasis type='normal'>Leasehold Law</emphasis>
, para. 7.013.</para-text>
<para-text>The rent review is on an upward only basis. See <emphasis type='normal'>Leasehold Law</emphasis>
, para. 4.049. Another type of rent review clause can be substituted. The tenant covenants to keep the details of any rent review confidential. Although this may be commercially important for the landlord, there might be difficulties in enforcing the covenant.</para-text>
<para-text>The form assumes that guarantor(s) will guarantee the performance of the tenant's obligations. It also gives the landlord the option to require that the guarantor(s) take a new lease for the remainder of the term if the landlord forfeits current one. This extends the normal liability of a guarantor which would end on forfeiture. Because the original tenant's liability ends on assignment, subject only to the effect of any authorised guarantee agreement, his guarantor's liability is similarly limited. The landlord's position is therefore strengthened by a clause allowing it to withhold consent to an assignment unless a suitable guarantor guarantees the assignee's covenants.</para-text>
<para-text>The landlord covenants to comply with the terms of the head lease, so far as the sub-lease does not place the obligations on the subtenant. This is important for the sub-tenant, because the sub-lease comes to an end if the head lease is forfeited, subject to a right of relief (<legis-cite type='statute' id='1033194476' locsrc='1033194171' title='Law of Property Act' date='1925' docid='a1925(15&16Geo5)c20' dbid='master' validated='yes'>
<legis-name href='root'>Law of Property Act 1925</legis-name>
, <legis-ref href='s146(4)'>s. 146(4)</legis-ref>
</legis-cite>
). See <emphasis type='normal'>Leasehold Law</emphasis>
, para. 6.075.</para-text>
<para-text>Any dispute under the lease is to be referred to arbitration. See <emphasis type='normal'>Leasehold Law</emphasis>
, para. 7.133.</para-text>
</precedent-intro>
</test> -
Merging xml files element by lement
Hi, I have two xml files of dept and emp tables. I want to merg these two xml files in such a way that the output should be grouped by deptnos.
i.e., under dept deptno 10 child node, i should get all emp child nodes who have deptno 10. How can I do this using DBMS_XMLDOM. Please help. Thank you.
dept xml -
<?xml version="1.0"?>
<DEPT_SET>
<DEPT>
<DEPTNO>10</DEPTNO>
<DNAME>ACCOUNTING</DNAME>
<LOC>NEW YORK</LOC>
</DEPT>
<DEPT>
<DEPTNO>20</DEPTNO>
<DNAME>RESEARCH</DNAME>
<LOC>DALLAS</LOC>
</DEPT>
<DEPT>
<DEPTNO>30</DEPTNO>
<DNAME>SALES</DNAME>
<LOC>CHICAGO</LOC>
</DEPT>
<DEPT>
<DEPTNO>40</DEPTNO>
<DNAME>OPERATIONS</DNAME>
<LOC>BOSTON</LOC>
</DEPT>
</DEPT_SET>
emp xml -
<?xml version="1.0"?>
<EMP_SET>
<EMP>
<EMPNO>7369</EMPNO>
<ENAME>SMITH</ENAME>
<JOB>CLERK</JOB>
<MGR>7902</MGR>
<HIREDATE>17-DEC-80</HIREDATE>
<SAL>800</SAL>
<DEPTNO>20</DEPTNO>
</EMP>
<EMP>
<EMPNO>7499</EMPNO>
<ENAME>ALLEN</ENAME>
<JOB>SALESMAN</JOB>
<MGR>7698</MGR>
<HIREDATE>20-FEB-81</HIREDATE>
<SAL>1600</SAL>
<COMM>300</COMM>
<DEPTNO>30</DEPTNO>
</EMP>
<EMP>
<EMPNO>7521</EMPNO>
<ENAME>WARD</ENAME>
<JOB>SALESMAN</JOB>
<MGR>7698</MGR>
<HIREDATE>22-FEB-81</HIREDATE>
<SAL>1250</SAL>
<COMM>500</COMM>
<DEPTNO>30</DEPTNO>
</EMP>
<EMP>
<EMPNO>7566</EMPNO>
<ENAME>JONES</ENAME>
<JOB>MANAGER</JOB>
<MGR>7839</MGR>
<HIREDATE>02-APR-81</HIREDATE>
<SAL>2975</SAL>
<DEPTNO>20</DEPTNO>
</EMP>
<EMP>
<EMPNO>7654</EMPNO>
<ENAME>MARTIN</ENAME>
<JOB>SALESMAN</JOB>
<MGR>7698</MGR>
<HIREDATE>28-SEP-81</HIREDATE>
<SAL>1250</SAL>
<COMM>1400</COMM>
<DEPTNO>30</DEPTNO>
</EMP>
<EMP>
<EMPNO>7698</EMPNO>
<ENAME>BLAKE</ENAME>
<JOB>MANAGER</JOB>
<MGR>7839</MGR>
<HIREDATE>01-MAY-81</HIREDATE>
<SAL>2850</SAL>
<DEPTNO>30</DEPTNO>
</EMP>
<EMP>
<EMPNO>7782</EMPNO>
<ENAME>CLARK</ENAME>
<JOB>MANAGER</JOB>
<MGR>7839</MGR>
<HIREDATE>09-JUN-81</HIREDATE>
<SAL>2450</SAL>
<DEPTNO>10</DEPTNO>
</EMP>
<EMP>
<EMPNO>7788</EMPNO>
<ENAME>SCOTT</ENAME>
<JOB>ANALYST</JOB>
<MGR>7566</MGR>
<HIREDATE>09-DEC-82</HIREDATE>
<SAL>3000</SAL>
<DEPTNO>20</DEPTNO>
</EMP>
<EMP>
<EMPNO>7839</EMPNO>
<ENAME>KING</ENAME>
<JOB>PRESIDENT</JOB>
<HIREDATE>17-NOV-81</HIREDATE>
<SAL>5000</SAL>
<DEPTNO>10</DEPTNO>
</EMP>
<EMP>
<EMPNO>7844</EMPNO>
<ENAME>TURNER</ENAME>
<JOB>SALESMAN</JOB>
<MGR>7698</MGR>
<HIREDATE>08-SEP-81</HIREDATE>
<SAL>1500</SAL>
<COMM>0</COMM>
<DEPTNO>30</DEPTNO>
</EMP>
<EMP>
<EMPNO>7876</EMPNO>
<ENAME>ADAMS</ENAME>
<JOB>CLERK</JOB>
<MGR>7788</MGR>
<HIREDATE>12-JAN-83</HIREDATE>
<SAL>1100</SAL>
<DEPTNO>20</DEPTNO>
</EMP>
<EMP>
<EMPNO>7900</EMPNO>
<ENAME>JAMES</ENAME>
<JOB>CLERK</JOB>
<MGR>7698</MGR>
<HIREDATE>03-DEC-81</HIREDATE>
<SAL>950</SAL>
<DEPTNO>30</DEPTNO>
</EMP>
<EMP>
<EMPNO>7902</EMPNO>
<ENAME>FORD</ENAME>
<JOB>ANALYST</JOB>
<MGR>7566</MGR>
<HIREDATE>03-DEC-81</HIREDATE>
<SAL>3000</SAL>
<DEPTNO>20</DEPTNO>
</EMP>
<EMP>
<EMPNO>7934</EMPNO>
<ENAME>MILLER</ENAME>
<JOB>CLERK</JOB>
<MGR>7782</MGR>
<HIREDATE>23-JAN-82</HIREDATE>
<SAL>1300</SAL>
<DEPTNO>10</DEPTNO>
</EMP>
</EMP_SET>
Required output is -
<?xml version="1.0"?>
<DEPT_SET>
<DEPT>
<DEPTNO>10</DEPTNO>
<DNAME>ACCOUNTING</DNAME>
<LOC>NEW YORK</LOC>
</DEPT>
<DEPT>
<DEPTNO>20</DEPTNO>
<DNAME>RESEARCH</DNAME>
<LOC>DALLAS</LOC>
</DEPT>
<EMP>
<EMPNO>7369</EMPNO>
<ENAME>SMITH</ENAME>
<JOB>CLERK</JOB>
<MGR>7902</MGR>
<HIREDATE>17-DEC-80</HIREDATE>
<SAL>800</SAL>
<DEPTNO>20</DEPTNO>
</EMP>
<DEPT>
<DEPTNO>30</DEPTNO>
<DNAME>SALES</DNAME>
<LOC>CHICAGO</LOC>
</DEPT>
<DEPT>
<DEPTNO>40</DEPTNO>
<DNAME>OPERATIONS</DNAME>
<LOC>BOSTON</LOC>
</DEPT>
</DEPT_SET>Well, if you are building the dept and emp XML files yourself, then the easiest solution is to use one SQL/XML (XMLElement, XMLForest, XMLAgg) statement to build the required XML instead of building two pieces and trying to merge.
If you can't go that option, then you can use importNode and appendChild to insert your selected nodes into the correct spot in the main XML.
As a starter, here is a snippet of code that takes a single node from a temp DOMDocument and inserts it into the master DOMDocument at a certain location.
l_inq_nodelist := dbms_xmldom.getelementsbytagname(l_temp_domdoc,
'theDesiredNode');
l_inq_nl_len := xmldom.getlength(l_inq_nodelist);
IF l_inq_nl_len > 0 THEN
-- Take the node above and adopt it into the response document
l_temp2_nd := dbms_xmldom.importNode(o_response_doc,
dbms_xmldom.item(l_inq_nodelist, 0),
TRUE);
-- Put the node in the correct position in the response document
l_temp2_nd := xdb.dbms_xmldom.appendChild(l_rsp_msg_nd, l_temp2_nd);
END IF;I know your situation is slightly different as you need to take multiple nodes but once you can select out your nodes from the emp XML, you can use the above to insert into the dept XML. I would provide more samples but it has been a while since I've read XML via DOMDocument as I use XMLType when reading XML. Feel free to post what you have if you get stuck. -
HI!
i am trying to procedure a XML document within a PL/SQL block from a dynamic query. the XML document (of DBMS_XMLDOM.DOMDocument type) will be return as an output parameter of the procedure. when i tried to create a new empty DOM document i encounter this error.
ORA-06502: PL/SQL: numeric or value error: raw variable length too long
ORA-06512: at "XDB.DBMS_XMLDOM", line 3637
my code looks like the following:
var := xmltype('<PERSON> <NAME> ramesh </NAME> </PERSON>');
dom1 := DBMS_XMLDOM.newDOMDocument(var);
even if i do just this
dom1 := DBMS_XMLDOM.newDOMDocument();
i will get the same error as well.
anyone know how to create an empty XML document (so that i can attach subtrees to it)?
thanks"...errors during the project validation that have to be fixed before burning the project."
I have the same issue years after your question was posted. My issue is that there were images intentionally left out of the DVD format and submenu's or buttons not on every page of the DVD. Again intentionally. This was a conflict for iDVD, so I added the extra images. Unfortunately you are only allowed 99 submenus so I could not add more to the iDVD project as instructed in the errors listing.
How can this be burned when I'm not wanting or needing the 'fixes" that iDVD say are missing? -
Is it possible to add variable defined as xmltype to an xmldom node?
Hi,
I'm trying to produce a complex XML document that doesn't lend itself well to using SQL XML functions (xmlagg, xmlelement, etc.) because various disparate data needs to be pulled together via seperate queries and then stuck into the final document in the correct spots.
So I've resorted to using the convoluted pl/sql xmldom functions. What I'm wondering though is if it is possible to take data in an xmltype variable and somehow append it as a node within my xml document? Something as in the following pseudo code:
begin
doc := xmldom.newDOMDocument;
main_node := xmldom.makeNode (doc);
select xmlelement("Address",...) -- more xmlelements containing related address info (street, city, etc.)
into l_address
from ...;
new_node := xmldom.appendChild (main_node, xmldom.makeNode (l_address));
end;
If possible, this would save me a tremendous amount of time from having to code every element and attributes via the xmldom functions.
Thanks,
AlanI've done the same scenario you are describing, shove XML defined in an XMLType into a DOMDocument. I munged the code to hide system specific references so the code works, just not as pasted here. The document is being built in o_response_doc and goes after the node previously built in l_rsp_msg_nd. The input is l_xmltype. May be a better way but I never found one and came up with this based on the Oracle documentation and trial and error.
-- Convert the XMLType to a DOMDocument so we can extract the needed node
-- and insert it into the response DOMDocument
l_temp_domdoc := dbms_xmldom.newdomdocument(l_xmltype);
l_inq_nodelist := dbms_xmldom.getelementsbytagname(l_temp_domdoc,
'DesiredXMLTypeNodeName');
l_inq_nl_len := xmldom.getlength(l_inq_nodelist);
IF l_inq_nl_len > 0 THEN
-- Take the node above and adopt it into the response document
l_temp2_nd := dbms_xmldom.importNode(o_response_doc,
dbms_xmldom.item(l_inq_nodelist, 0),
TRUE);
-- Remove the a: namespace that was autoadded. (this was defined in the l_xmltype XML)
dbms_xmldom.removeattribute(dbms_xmldom.makeelement(l_temp2_nd),
<ns_pfx>,
<ns_uri>);
-- Put the node in the correct position in the response document
l_temp2_nd := xdb.dbms_xmldom.appendChild(l_rsp_msg_nd, l_temp2_nd);
END IF;
dbms_xmldom.freeDocument(l_temp_domdoc);
Maybe you are looking for
-
Need to know what to do with new phone and no screen and no support from Telus Store
Purchased a brand new BB Curve 8530, and resigned another three year plan at Telus. Within 20 days, the screen went black and would not light up. I had used the phone in the morning to send a textmail, then set it on the charger. Later in the day, I
-
Unanswered Xgrid question...
Hi everyone, No responses to my first question. If I am asking a stupid question, just tell me. I'd like to get a mac pro and connect it to my laptop when I'm home using the xgrid software and a spare ethernet cable, to take advantage of the extra pr
-
Jdev 11.1.1.2.0 SelectBooleanCheckbox problem
Hi, We migrate to 11.1.1.2.0 and I'm facing the following problem: I have a selectBoolenCheckBox in a table based on a boolean attribute of a view object. whenever a users checks it , it's value becomes null! any idea? Tilemahos
-
Client access issues when mailboxes are mounted on a specific mailbox server
One of our 3 mailbox servers gives us an error when mailbox databases are mounted on it. All web services are not functioning properly, there is an event log error for each web service web.config file saying file not found, If I open each web.config
-
HT204365 How to email pdf files from iBook in iPad?
Why I can only see "print" but no "email" button when i open my pdf files in iBooks? As far as i know i should be able to email my pdf files from ibooks right?