Dbms_xmldom and xmldom
what is the difference between xmldom and dbms_xmldom packages?
Has anyone worked with dbms_xmldom? if so does it still uses JVM inside the database?
dbms_xmldom implemented in C, which doesn't need JVM.
xmldom is implemented in Java. You should use dbms_xmldom in Oracle9i.
Similar Messages
-
Problem with special characters and xmldom.writetoclob
Hi!
I have a problem with oracle parser in pl/sql.
My situation:
i have a clob with valid xml with for example decoded characters:
(spaces between & and # are for good representing characters by browser - in really there is no spaces)
<xml>
<any><![CDATA[ & #187; ]]> text <![CDATA[ & #187; ]]></any>
</xml>
i read this xml from clob, parse it and put into another clob by using
xmldom.writetoclob procedure.
And in second clob i have"
<xml>
<any>& #38;#187; text & #38;#187; </any>
</xml>
(ampersand is representing as & #38; !) Why there is not the cdata sections ?
Why the value of these sections changed?
Any ideas? I'm using newset xdk (9202) in 8.1.7.3 database.
Please help!Hi John,
According to your description, my understanding is that the Author showed incorrect character in SharePoint 2013 search result page.
I tested the same scenario per your post in my environment, and the Müller showed correctly in SharePoint search result page.
I recommend to reset the index in Search Service Application and run a full crawl to see if the issue still occurs.
Best regards.
Thanks
Victoria Xia
TechNet Community Support -
Regarding schema validation and dbms_xmlparser, dbms_xmldom
Hi All,
Recently I came across one scenario, where I need to register XSD and validate all incoming xml agaist registered XSD and then access its contents and process them as per business needs.
To accomplish this:
1. Simply I have registered XSD using registerschema+ .
2. To validate xmls, used schemaValidate+ .
3. Once this is done then to fetch value from xml, I used below statement:
SELECT EXTRACTVALUE (COLUMN_VALUE, '/details/emp_id') "Employee_ID"
FROM TABLE
+(XMLSEQUENCE+
+(XMLTYPE+
+('<?xml version="1.0"?>+
+<employee>+
+<details>+
+<emp_id>1001</emp_id>+
+</details>+
+</employee>'+
+).EXTRACT ('/employee/details')+
+)+
+) t;+
This works fine.
But I was browsing the same requirement over forum, got solutions related to DBMS_XMLPARSER and DBMS_XMLDOM.
I tried to go through its details but didnt get much idea on the same.
Can anyone please help me to understand about use of dbms_xmlparser and dbms_xmldom and about DOM.
In which scenario we need to use them?
Thanks
VikramWhere I was thinking with that sentence is the "streaming evaluation" that Oracle now offers. This option is available when XML is stored in an XMLType column of SECUREFILE BINARY format (introduced in 11.1.0.6 and default for XMLType columns in 11.2.0.2) and that data is queried/accessed.
You can find some information on it here
http://docs.oracle.com/cd/B28359_01/appdev.111/b28369/xdb01int.htm
(Search for "streaming")
and here as well
http://docs.oracle.com/cd/B28359_01/appdev.111/b28369/xdb_xquery.htm#CBAIIEFG
Streaming is basically reading the data as Oracle scans past it since it knows, based on the binary storage format, what the XML looks like, so it does not need to create the whole document to find the sections the XPath/XQuery specifies. You can see that a SQL statement is using streaming evaluation when "XPATH EVALUATION" shows up in the explain plan as shown by
{message:id=10737315}
This option is only available when the XML is stored in the DB in the correct format. If the XML is stored in a PL/SQL variable, Oracle cannot use streaming evaluation on it. -
Need to read a XML file and store multilingual data
I am having an XML file which contains multiple records and each maybe in a different language .identified EN -english ES-Spanish etc
- <Document xmlns="http://www.xxxxx.com/ws/integration/toolkit/2011/05">
- <Attributes>
<Attribute name="duration">0:00:02.993</Attribute>
<Attribute name="count">47</Attribute>
<Attribute name="entity">Requisition</Attribute>
<Attribute name="mode">XML</Attribute>
<Attribute name="version">http://www.xxxx.com/ws/tee800/2009/01</Attribute>
</Attributes>
- <Content>
- <ExportXML xmlns="http://www.xxxxx.com/ws/integration/toolkit/2005/07/action/export">
- <record>
<field name="ContestNumber">120000002O</field>
<field name="JobInformation,JobType,Description">Standard</field>
<field name="JobFamily">ACCOUNTING/FINANCE</field>
<field name="JobInformation,Organization,Name">CHMS-DO NOT USE</field>
<field name="Country">USA</field>
<field name="State">Illinois</field>
<field name="City">Lake County</field>
<field name="Title_EN">TaTest1</field>
<field name="Title_es">TaTest1 translated to Espanol</field>
<field name="InternalDescription_EN">Humira marketing team - develop programs.</field>
<field name="InternalDescription_zhCN" />
<field name="InternalDescription_zhTW" />
<field name="InternalDescription_es">Development of marketing programs for </field>
<field name="ExternalDescription_EN">Marketing programs for core products</field>
<field name="ExternalDescription_zhCN" />
<field name="ExternalDescription_zhTW" />
<field name="ExternalDescription_es">Marketing core products - Spain</field>
<field name="URL_en">http://[ZONE]/careersection/[CAREER_SECTION]/jobdetail.ftl?lang=en&job=120000002O</field>
<field name="URL_zhCN" />
<field name="URL_zhTW" />
<field name="URL_es">http://[ZONE]/careersection/[CAREER_SECTION]/jobdetail.ftl?lang=es&job=120000002O</field>
<field name="PostedExternally">true</field>
<field name="PostedInternally">true</field>
<field name="EnglishActive">true</field>
<field name="SimplifiedChineseActive">false</field>
<field name="TraditionalChineseActive">false</field>
<field name="SpanishActive">true</field>
<field name="InternalBonusTracking" />
<field name="ExternalBonusTracking" />
<field name="POSTING_GRADE" />
<field name="SAP_Schedule">Full-time</field>
<field name="PostingDateExternal">2012-11-20</field>
<field name="PostingDateInternal">2012-11-20</field>
</record>
</ExportXML>
</Content>
</Document>
I need to store and retrieve data into a AL32UTF8 database without losing language attributed.
I am using DBMS_XMLDOM.getnodevalue (); to fetch the XML stored in a CLOB column
But the package returns VARCHAR2 .How do i return NVARCHAR2 so that i can store Multilingual data
DBMS_XMLDOM.GETNODEVALUE(
n IN DOMNode)
RETURN VARCHAR2;
Or is there an easier way around using XMLTYPE
Edited by: Rameshkumar T on Nov 27, 2012 6:14 AMdbms_lob.loadclobfromfile( v_xml_msg
, v_xml_bfile
, dbms_lob.getlength(v_xml_bfile)
, v_dest_offset
, v_src_offset
, NLS_CHARSET_ID('AL32UTF8')
, v_lang_context
, v_warning
SELECT message
INTO v_xml_clob
FROM gjb_xml_message gtmq
WHERE message_id = v_msg_id;
v_line_no := 1;
v_doc := dbms_xmldom.newDOMDocument(v_xml_clob);
v_line_no := 2;
v_nodes := dbms_xmldom.getElementsByTagName(v_doc, '*');
FOR i IN 0..dbms_xmldom.getlength(v_nodes)-1
LOOP
BEGIN
v_line_no := 3.0;
v_element_x := dbms_xmldom.makeelement(xmldom.item(v_nodes,i));
v_line_no := 3.1;
v_node := dbms_xmldom.item(v_nodes,i);
v_line_no := 3.2;
v_tag := dbms_xmldom.getNodeName(v_node);
v_line_no := 3.3;
v_node_2 := dbms_xmldom.getfirstchild(v_node);
v_line_no := 4.0;
v_node_map := DBMS_XMLDOM.getattributes (v_node);
FOR x in 0 ..DBMS_XMLDOM.getlength (v_node_map)- 1
LOOP
BEGIN
v_line_no := 4.1;
v_one_node := DBMS_XMLDOM.item (v_node_map, x);
v_line_no := 4.2;
v_attrname := DBMS_XMLDOM.getnodename (v_one_node);
v_line_no := 4.3;
v_attrval := DBMS_XMLDOM.getnodevalue (v_one_node);
IF v_attrval = 'ContestNumber' THEN
v_line_no := 4.4;
v_contest_num := v_tag_value;
v_rec_no := NULL;
IF v_load_type = 'I' THEN
v_rec_no := fn_get_job_id(v_contest_num);
END IF;
IF v_rec_no IS NULL THEN
SELECT seq_gjbjobid.NEXTVAL
INTO v_rec_no
FROM dual;
END IF;
END IF;
IF UPPER(v_tag) = 'FIELD' THEN
BEGIN
v_line_no := 5;
INSERT INTO gjb_xml_data
( message_id
, job_id
, tag_name
, col_name
, col_no
, tag_level
, tag_value
, tag_lang
, tag_value_clob
SELECT v_msg_id
, v_rec_no
, tag_name
, col_name
, col_no
, tag_level
, v_tag_value
, tag_lang
, v_tag_value_clob
FROM gjb_xml_tags gxt
WHERE tag_name = v_attrval;
v_tag_value := NULL;
v_tag_value_clob := NULL;Edited by: Rameshkumar T on Nov 27, 2012 8:27 AM -
Problem with XMLDOM package (Oracle 10.2.0.1.0)
Hi,
I am using the dbms_xmldom package to generate xml files (specific structure).
Below is the code but It produces nothing (dbms_output does not return) :
DECLARE
doc xmldom.DOMDocument;
main_node xmldom.DOMNode;
root_node xmldom.DOMNode;
root_elmt xmldom.DOMElement;
transmissionHeaderNode xmldom.DOMNode;
transmissionHeaderElement xmldom.DOMElement;
item_node xmldom.DOMNode;
item_elmt xmldom.DOMElement;
item_text xmldom.DOMText;
buffer_problem CLOB;
BEGIN
doc := xmldom.newDOMDocument;
main_node := xmldom.makeNode(doc);
xmldom.setversion(doc,'1.0');
root_elmt := xmldom.createElement(doc, 'InvoiceTransmission');
root_node := xmldom.appendChild( main_node, xmldom.makeNode(root_elmt));
transmissionHeaderElement := xmldom.createElement(doc, 'TransmissionHeader');
transmissionHeaderNode := xmldom.appendChild(root_node, xmldom.makeNode(transmissionHeaderElement));
item_elmt := xmldom.createElement(doc, 'TransmissionDateTime');
item_node := xmldom.appendChild(transmissionHeaderNode, xmldom.makeNode(item_elmt));
item_text := xmldom.createTextNode(doc, TO_CHAR(SYSDATE,'DD-MM-YYYY'));
item_node := xmldom.appendChild(item_node, xmldom.makeNode(item_text));
item_elmt := xmldom.createElement(doc, 'IssuingOrganiszationID');
item_node := xmldom.appendChild(transmissionHeaderNode, xmldom.makeNode(item_elmt));
item_text := xmldom.createTextNode(doc,'0258');
item_node := xmldom.appendChild(item_node, xmldom.makeNode(item_text));
item_elmt := xmldom.createElement(doc, 'Version');
item_node := xmldom.appendChild(transmissionHeaderNode, xmldom.makeNode(item_elmt));
item_text := xmldom.createTextNode(doc, 'IATA:ISXMLInvoiceV3.0');
item_node := xmldom.appendChild(item_node, xmldom.makeNode(item_text));
xmldom.writetobuffer(doc, buffer_problem);
dbms_output.put_line(buffer_problem);
xmldom.freeDocument(doc);
END;
That's strange because when remove a code part like :
item_elmt := xmldom.createElement(doc, 'Version');
item_node := xmldom.appendChild(transmissionHeaderNode, xmldom.makeNode(item_elmt));
item_text := xmldom.createTextNode(doc, 'IATA:ISXMLInvoiceV3.0');
item_node := xmldom.appendChild(item_node, xmldom.makeNode(item_text));
I can get the ouput xml :
<?xml version="1.0"?>
<InvoiceTransmission>
<TransmissionHeader>
<TransmissionDateTime>26-10-2010</TransmissionDateTime>
<IssuingOrganiszationID>0258</IssuingOrganiszationID>
</TransmissionHeader>
</InvoiceTransmission>
I don't if it's a problem with xmldom or with dbms_output package...
Please someone can help me ?Works fine for me
Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.4.0
SQL> set serveroutput on;
SQL>
SQL> DECLARE
2 doc xmldom.DOMDocument;
3 main_node xmldom.DOMNode;
4 root_node xmldom.DOMNode;
5 root_elmt xmldom.DOMElement;
6
7 transmissionHeaderNode xmldom.DOMNode;
8 transmissionHeaderElement xmldom.DOMElement;
9 item_node xmldom.DOMNode;
10 item_elmt xmldom.DOMElement;
11 item_text xmldom.DOMText;
12
13 buffer_problem CLOB;
14
15 BEGIN
16
17 doc := xmldom.newDOMDocument;
18 main_node := xmldom.makeNode(doc);
19 xmldom.setversion(doc,'1.0');
20 root_elmt := xmldom.createElement(doc, 'InvoiceTransmission');
21 root_node := xmldom.appendChild( main_node, xmldom.makeNode(root_elmt));
22
23 transmissionHeaderElement := xmldom.createElement(doc, 'TransmissionHeader');
24 transmissionHeaderNode := xmldom.appendChild(root_node, xmldom.makeNode(transmissionHeaderElement));
25
26 item_elmt := xmldom.createElement(doc, 'TransmissionDateTime');
27 item_node := xmldom.appendChild(transmissionHeaderNode, xmldom.makeNode(item_elmt));
28 item_text := xmldom.createTextNode(doc, TO_CHAR(SYSDATE,'DD-MM-YYYY'));
29 item_node := xmldom.appendChild(item_node, xmldom.makeNode(item_text));
30
31 item_elmt := xmldom.createElement(doc, 'IssuingOrganiszationID');
32 item_node := xmldom.appendChild(transmissionHeaderNode, xmldom.makeNode(item_elmt));
33 item_text := xmldom.createTextNode(doc,'0258');
34 item_node := xmldom.appendChild(item_node, xmldom.makeNode(item_text));
35
36 item_elmt := xmldom.createElement(doc, 'Version');
37 item_node := xmldom.appendChild(transmissionHeaderNode, xmldom.makeNode(item_elmt));
38 item_text := xmldom.createTextNode(doc, 'IATA:ISXMLInvoiceV3.0');
39 item_node := xmldom.appendChild(item_node, xmldom.makeNode(item_text));
40
41 --buffer_problem := 'a'; -- added to initialize clob
42 xmldom.writetobuffer(doc, buffer_problem); -- change to writetoclob
43 dbms_output.put_line(buffer_problem);
44 xmldom.freeDocument(doc);
45
46 END;
47 /
<?xml version="1.0"?>
<InvoiceTransmission>
<TransmissionHeader>
<TransmissionDateTime>26-10-2010</TransmissionDateTime>
<IssuingOrganiszationID>0258</IssuingOrganiszationID>
<Version>IATA:ISXMLInvoiceV3.0</Version>
</TransmissionHeader>
</InvoiceTransmission>Suggestions:
- Use dbms_xmldom instead of just xmldom. Oracle changed the name in the 9i days and xmldom is a synonym to dbms_xmldom.
- Use .writeToClob intead of .writeToBuffer
- I would suggest trying to upgrade to .4 as you pick up a lot of improvements and bug fixes. Whether what you are encountering is a bug I cannot say but would seem so.
- See the FAQ under your sign-in name to learn how to use the tag to format the code like I did above. -
Update passed in XML doc with pl/sql xmldom
Hi,
I have an xml document that is passed in through a stored procedure as CLOB. I'm trying to use the XMLParser and XMLDOM to add an additional node
The XML looks something like the following
<rowset>
<row>
<firstname>john</firstname>
</row>
<row>
<firstname>jane</firstname>
</row>
</rowset>
I need to loop through each of <mynames> nodes and then add another node <lastame> so it looks like the following
<rowset>
<row>
<firstname>john</firstname>
<lastame>smith</lastame>
</row>
<row>
<firstname>jane</firstname>
<lastame>smith</lastame>
</row>
</rowset>
I have the following code
parseClob XMLPARSER.Parser;
newNames XMLDOM.DOMDocument;
tempNode XMLDOM.DOMNode;
mye xmldom.domelement;
item_text xmldom.DOMText;
numofrows number;
nodeList xmldom.DOMNodeList;
newnode xmldom.domnode;
parseClob := xmlparser.newParser;
XMLPARSER.parseClob(parseClob,names);
newNames := XMLPARSER.getDocument(parseClob);
XMLPARSER.freeParser(parseClob);
nodeList := xslprocessor.selectNodes(xmldom.makeNode(newNames), '//rowset/row');
numOfRows := xmldom.getlength(nodeList)-1;
for i in 0..numOfRows LOOP
newnode := xmldom.item(nodeList, i);
--create the new node
mye := xmldom.createElement(newName, 'lastname');
--add it to the new node
tempNode := xmldom.appendChild(newnode, xmldom.makeNode(mye));
--update the text in the lastname
item_text := xmldom.createTextNode(newNames, 'smith');
tempNode := xmldom.appendChild(tempNode, xmldom.makeNode(item_text));
end loop;
what happens is that when i write out the newnode xml out to a buffer i see the <lastname> tag
but when i write out the newNames xml out to a buffer after the loop is finished the <lastname> tag is
missing. like it didn't update the newNames xml
I've seen lots of example on how to create an XML document with the DOM from scratch but nothing about updating
an passed in xml document. any help would be appreciatedUpdatexml is reference in Oracle 9i, I'm sorry i should have mentioned that I am using oracle 8i. Is there something you can use in oracle 8i?
-
To : Oracle Team.. xmldom.writetoclob is too slow
HI;
I had Oracle 8.1.6, Used the xmldom package a lot to manipulate and create xml documents ( all sizes ). then I used xmldom.writetoclob which it was giving a GREAT performance.
I UPGRADED ti Oracle 8.1.7 and xmldom.writetoclob is TOO SLOW now, I have the same settings ( java_pool_size, share_pool, etc)
What changed from 8.1.6 to 8.1.7 ??
Why xmldom.writetoclob is so much slower in 8.1.7 ??
when tranfering a 300 KB document with 8.1.6 it used to take 30 seconds, no with 8.1.7 IT TAKES 2-1/2 minutes ?????
WHY ? ? ? ? ?
Tahnks for any information..My guess is that you are creating a clob with cached set to false
e.g
dbms_lob.createtemporary(v_myclob,false);
When set to false any time the clob is written to the characters are written to the disk. causing it to be slow.
try
dbms_lob.createtemporary(v_myclob,true);
I had the same problem. This speeds it up significantly
Rick Laird -
Oracle 9i and xmltype, ora-03001
I get this message: 'ora-03001 unimplemented feature' when i
trying to create a table with this statement: create table
purchaseorder(podocument sys.xmltype);
-The user has the following roles:
connect, resource, javauserpriv, query rewrite, create any
directory.
-And execute privilege on xmlparser and xmldom (granted by sys).
-The init.ora file is included with query_rewrite_enabled=true,
query_rewrite_integrity=trusted.
What's wrong?Colleague, I had problem the same that its, also with the postagem of a message here in this forum. I have the successfully installed Oracle 9i EE, after two weeks of very work, in IBM to xServer 220, with SuSE 7.2 This error occurred due to the fact of incorrect parameters of the init.ora, as well as, through some definite parameters incorrectly, in that if it says respect the 0 variable of environment of the ORACLE. One remembers to modify parameter REMOTE_LOGIN... of EXCLUSIVE for NONE and of preference it comments this in its archive INIT.ORA. Of one looked at in check list of installation of the Oracle, as well as in the specific manual of pattern for its distribution for the correct definition of the parameters of its archive of pattern.
-
Hello All,
I have recently come across a problem where I could not locate the XMLDOM package for SYS on one of the Oracle 9i installations. I always thaought my installation was standard installation and XMLDOM appears automatically. Obviously I never went through the different bits and pieces to remove a component from being installed.
Can anybody tell me which component needs to be selected for me to get XMLDOM on the machine
TIA,this is what "javap -c" generates, which is kind of simlar to what you see from your decompiler there:public static void main(java.lang.String[]);
Code:
0: iconst_1
1: istore_1
2: iconst_0
3: istore_2
4: iload_1
5: iload_2
6: idiv
7: istore_3
8: getstatic #2; //Field java/lang/System.out:Ljava/io/PrintStream;
11: ldc #3; //String Phew!
13: invokevirtual #4; //Method java/io/PrintStream.println:(Ljava/lang/String;)V
16: goto 48
19: astore_3
20: aload_3
21: invokevirtual #6; //Method java/lang/Exception.printStackTrace:()V
24: getstatic #2; //Field java/lang/System.out:Ljava/io/PrintStream;
27: ldc #3; //String Phew!
29: invokevirtual #4; //Method java/io/PrintStream.println:(Ljava/lang/String;)V
32: goto 48
35: astore 4
37: getstatic #2; //Field java/lang/System.out:Ljava/io/PrintStream;
40: ldc #3; //String Phew!
42: invokevirtual #4; //Method java/io/PrintStream.println:(Ljava/lang/String;)V
45: aload 4
47: athrowThere is also an Exception table, which explains, perhaps, how the "finally" statement is considered:Exception table:
from to target type
4 8 19 Class java/lang/Exception
4 8 35 any
19 24 35 any
35 37 35 any -
Xmldom.writetoClob()
Hi ,
I've some problem saving back my xml document in Clob:
If I performe the procedure
xmldom.writetobuffer(DomDocument,variable_of_output);
the variable_of_output in varchar2 is well valorized.
Instead
If I performe the procedure
xmldom.writetoClob(DomDocument,variable_of_output);
where the variable_of_output is Clob
THE CODE STOP. The problem is present Even if i inizialize variable_of_output:=empty_clob();
Answer my question,Please.
Thanks youHi,
It probably depends on your database version. If your using 9i, you should use dbms_xmldom instead of xmldom. Furthermore, you might consider to use the following code (instead of the empty clob code):
DECLARE
t_doc DBMS_XMLDOM.DOMDocument;
t_clob CLOB;
BEGIN
... do stuff to fill t_doc
DBMS_LOB.createTemporary(t_clob, FALSE);
DBMS_XMLDOM.writeToClob(t_doc, t_clob);
DBMS_XMLDOM.freeDocument(t_doc);
... do stuff with t_clob
DBMS_LOB.freeTemporary(t_clob);
END;
I'm certain that dbms_xmldom replaces xmldom (v9.2+), I only can't remember the URL which says so...
Kind regards,
Michiel -
Hi all,
Can any body suggest the links which explains ALL XMLDOM Functions/Packages/Procedures.For exaple Xmldom.getelementsbytagname and Xmldom.gettagname.
Thanking you in Advance.Some information is in the Oracle XML DB developers guide in chapter ten.
http://download-west.oracle.com/docs/cd/B14117_01/appdev.101/b10790.pdf
getElementsByTagName() Retrieves the elements in the subtree by element. -
XMLType and Special Character Conversion
I'm looking for something to convert special characters like & to the actual & it represents.
I can't seem to find a method using
extract for an xmltype or xslprocessor.valueOf
I'm sure its something simple, but I'm having trouble putting my finger on it. Can anyone point me in the right direction?
ThanksLet me restate. When I use and XMLDom and the xslprocessor.valueOf function, "&" is converted to "&"
when I use v_char2 := v_doc.extract('/LoanPkg/Property/PRPTY_STRT_NME/text()').GetStringval;
It doesn't convert it. -
Hi to all,
I have a problem, when i build a XML document in my PL/SQL, using xmldom class, i want to set xmlns only in root node.
This is my code:
doc xmldom.DOMDocument;
main_node xmldom.DOMNode;
root_node xmldom.DOMNode;
root_elmt xmldom.DOMElement;
root_elmt_attributato xmldom.DOMElement;
BEGIN
doc := xmldom.newDOMDocument;
main_node := xmldom.makeNode(doc);
root_elmt := xmldom.createElement(doc, 'elencoClienti');
root_node := xmldom.appendChild(main_node, xmldom.makeNode(root_elmt));
xmldom.setAttribute(root_elmt, 'xmlns', 'indirizzo_namespace');
Then i add more than one node to root node, and finally i find in all level-one-parent of a root this attribute
xmlns=""
output example:
<?xml version="1.0" encoding="UTF-8"?>
<elencoClienti xmlns="indirizzo_namespace">
<elenco_pratiche xmlns="">
<rdl>
<id>122</id>
<tipo>PRDL</tipo>
<tran_comm>RDR</tran_comm>
<tipo_lav>TEST</tipo_lav>
<via>Maria Pia</via>
<codice_presa>5003241303200</codice_presa>
<data_protocollo>01/07/2000</data_protocollo>
</rdl>
</elenco_pratiche>
<esito_ricerca xmlns="">
<esito>OKEL</esito>
</esito_ricerca>
</elencoClienti>
both elenco_pratiche and esito_ricerca nodes have attribute xmlns="".
How can i remove that?
Thanks in advance
TeoI don't have installed DBMS_XMLDOM, the only class I can use is XMLDOM...
My problem seems to be a bug of this class..
So that i solved the problem in this way (my procedure has to write out a xml reply into a clob):
--after to write xml into a clob:
dbms_lob.createtemporary(output_clob,true);
xmldom.writeToClob(doc, output_clob);
xmldom.freeDocument(doc);
-- I remove unwanted attribute
output_clob := REPLACE(output_clob,' xmlns=""','');
Sometimes ignorance is a solution... ;-)
I will install dbms_xmldom and i will try to find solution, but now it seems a good patch
Teo -
LPX-00601: Invalid token Error in DBMS_XSLPROCESSOR
Hi All,
I am using DBMS_XMLDOM and DBMS_XSLPROCESSOR to parse the XML file.
the following code was working fine in Release 10.1.0.4.0
l_n :=DBMS_XSLPROCESSOR.selectsinglenode
(xmldom.makenode (doc)
,'/tmf:MTOSI_InventoryData/tmf:mdList/tmf:md/tmf:tlList/tmf:tlInv/tmf:tlNm');
v_mux_id :=DBMS_XMLDOM.getnodevalue(DBMS_XMLDOM.getfirstchild (l_n));
BANNER
Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - 64bi
PL/SQL Release 10.1.0.4.0 - Production
CORE 10.1.0.4.0 Production
TNS for Solaris: Version 10.1.0.4.0 - Production
NLSRTL Version 10.1.0.4.0 - Production
But we have copied the same code in Release 10.2.0.2.0 i am getting the following error Plese do the needful
11:42:03 AM ORA-31011: XML parsing failed
11:42:03 AM : Error occurred in XML processing
11:42:03 AM LPX-00601: Invalid token in: '/tmf:MTOSI_InventoryData/tmf:mdList/tmf:md/tmf:tlList/tmf:tlInv/tmf:tlNm'
11:42:03 AM ORA-06512: at line 9
11:42:03 AM *** Script stopped due to error ***
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bi
PL/SQL Release 10.2.0.2.0 - Production
CORE 10.2.0.2.0 Production
TNS for Solaris: Version 10.2.0.2.0 - Production
NLSRTL Version 10.2.0.2.0 - Production
Plese do the needful
Thanks in Advance
ElanFUNCTION SELECTSINGLENODE RETURNS RECORD
Argument Name Type In/Out Default?
ID RAW(13) OUT
N RECORD IN
ID RAW(13) IN
PATTERN VARCHAR2 IN
NAMESPACE VARCHAR2 IN DEFAULTYou need to provide the namespace prefix mapping for the prefixes tmf via the NAMESPACE parameter (eg 'xmlns:tmf="xxxxxx"' -
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 you are looking for
-
HT3231 Can you see 2 or more screens at the same time on a Macbook?
If you know how to set up your Macbook so that you can view 2 or more screens at the same time on the display, please tell me the steps I need to take to do this. Thanks!
-
File attachments on Mobile Devices
I created a simple test form with a file attachment button. It works in my PC browser, but hitting the button does nothing on my Android device. Is file attachment not supported on mobile devices and smartphones?
-
PortalSessionID Property in BSP iView in Portal
Dear All, I have created a BSP iView in Portal. This iView displays the start page of SAP Learning Solution BSP Application named "hcm_learning" which allows the user to run the course he/she booked for in a content player which opens up in
-
FR Studio Report Design version 9.3.1.0 - I have a column I have set up as a formula column in which I setup column/row formula as folllows (7695/100000) for .07695 rate in column DD Row 4 I tried in Column DE formula (column[DC].ifNonnumber(0) + (co
-
hi all i wanna create color transparent button.. can we do it in java? i search and try for few hours already but only can do the transparent.. i want have a soft color transparent in my button how to do that thx import java.awt.AlphaComposite; impor