XDK10g supports XML parsing for PL/SQL?
Hi,
I have a couple of questions here:
1) Does XDK10g support XML parsing for PL/SQL? (More specifically, I need to use xmlDom and xmlParser)
2) Does Oracle 10g come installed with XDK 10g? If not, does it even need to install XDK 10g to use xmlDom and xmlParser?
Thank you all and have a nice day.
Kelvin
Edited by: user9518458 on Oct 30, 2008 1:31 AM
Well, if you are talking 10.2, then
"The (Java-based) Oracle XDK PL/SQL packages XMLDOM, XMLPARSER, and XSL_PROCESSOR have been deprecated in favor of the (C-based) Oracle XML DB packages DBMS_XMLDOM, DBMS_XMLPARSER, and DBMX_XSLPROCESSOR. Synonyms have been provided to smooth the migration of legacy applications" (http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/whatsnew.htm#CHDCAICE)
Whether that is a default install option or one that requires selecting I can't say, but it is available without needing to additionally use the XDK. So odds are you can do whatever you need in PL/SQL using those DBMS_ packages (or XMLTYPE based variables if the need arises).
Similar Messages
-
Hi,
I have to produce and manipulate XML documents in PL/SQL. I have downloaded the XML Parser for PL/SQL from Oracle's web site.
Can anyone please:
1. Point me to some examples illustrating XML DOM manipulation with PL/SQL.
2. Any information about PL/SQL packages used for XML manipulation.
I am using Oracle 8i version 8.1.6
Thanks,
Rossen<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Rossen Petkov ([email protected]):
Hi,
I have to produce and manipulate XML documents in PL/SQL. I have downloaded the XML Parser for PL/SQL from Oracle's web site.
Can anyone please:
1. Point me to some examples illustrating XML DOM manipulation with PL/SQL.
2. Any information about PL/SQL packages used for XML manipulation.
I am using Oracle 8i version 8.1.6
Thanks,
Rossen<HR></BLOCKQUOTE>
Hope this will do something
set serveroutput on
create or replace procedure domsample(dir varchar2, inpfile varchar2, errfile varchar2) is
p xmlparser.parser;
doc xmldom.DOMDocument;
-- Print elements
procedure printElements( doc xmldom.DOMDocument) is
nl xmldom.DOMNodeList;
len number;
n xmldom.DOMNode;
t xmldom.DOMNode;
begin
-- get all elements.
nl := xmldom.getElementsByTagName(doc,'*');
len := xmldom.getLength(nl);
-- loop through elements.
for i in 0..len-1 loop
if xmldom.isnull(nl) = FALSE then
n := xmldom.item(nl,i);
IF xmldom.hasChildNodes(n) then
t := xmldom.getFirstChild(n);
dbms_output.put(xmldom.getNodeName(n) | |':');
dbms_output.put_line(xmldom.getNodeValue(t));
end if;
end if;
end loop;
dbms_output.put_line(' ');
end printElements;
-- print the attributes of each element in a document.
procedure printElementAttributes(doc xmldom.DOMDocument) is
nl xmldom.DOMNodelist;
len1 number;
len2 number;
n xmldom.DOMNode;
e xmldom.DOMElement;
nnm xmldom.DOMNamedNodeMap;
attrname varchar2(100);
attrval varchar2(100);
begin
-- get all Elements
nl := xmldom.getElementsByTagName(doc,'*');
len1 := xmldom.getLength(nl);
-- loop through elements.
for j in 0 .. len1 - 1 loop
n := xmldom.item(nl,j);
e := xmldom.makeElement(n);
dbms_output.put_line(xmldom.getTagName(e) | | ':');
-- get all attributes of element
nnm := xmldom.getAttributes(n);
if (xmldom.isNull(nnm) = FALSE) then
len2 := xmldom.getLength(nnm);
-- loop through attributes
for i in 0..len2 -1 loop
n := xmldom.item(nnm,i);
attrname := xmldom.getNodeName(n);
attrval := xmldom.getNodeValue(n);
dbms_output.put(' '| |attrname| |' = '| |attrval);
end loop;
dbms_output.put_line(' ');
end if;
end loop;
end printElementAttributes;
begin
-- new parser.
p := xmlparser.newParser;
-- set some charecterstics.
xmlparser.setValidationMode(p,FALSE);
xmlparser.setErrorLog(p, dir| |'/'| |errfile);
xmlparser.setBaseDir(p,dir);
-- parse input file
xmlparser.parse(p,dir| |'/'| |inpfile);
-- get document
doc := xmlparser.getDocument(p);
-- print document elements.
dbms_output.put_line('The elements are: ');
printElements(doc);
-- print document element attributes
dbms_output.put_line('The attributes of each element are: ');
printElementAttributes(doc);
-- deal with exception
exception
when xmldom.INDEX_SIZE_ERR then
raise_application_error(-20120,'Index Size Error');
when xmldom.DOMSTRING_SIZE_ERR then
raise_application_error(-20120,'String Size Error');
when xmldom.HIERARCHY_REQUEST_ERR then
raise_application_error(-20120,'Hierarchy Request Error');
when xmldom.WRONG_DOCUMENT_ERR then
raise_application_error(-20120,'Worng Document Error');
when xmldom.INVALID_CHARACTER_ERR then
raise_application_error(-20120,'Invalid Character Error');
when xmldom.NO_DATA_ALLOWED_ERR then
raise_application_error(-20120,'No Data Allowed Error ');
when xmldom.NO_MODIFICATION_ALLOWED_ERR then
raise_application_error(-20120,'No Modification Allowed Error');
when xmldom.NOT_FOUND_ERR then
raise_application_error(-20120,'Not Found Error');
when xmldom.NOT_SUPPORTED_ERR then
raise_application_error(-20120,'Not Supported Error');
when xmldom.INUSE_ATTRIBUTE_ERR then
raise_application_error(-20120,'In Use Attribute Error');
end domsample;
show errors;
Cheers
Srianth -
Loading XML parser for PL/SQL
I am working my way thru 'Building Oracle XML Applications' by Steve Muench.
I am getting a problem when I try to install the XML parser for PL/SQL
The following errors occur when I try to do
loadjava -v -r -u xmlbook/xmlbook xmlparserv2.jar
initialization complete
loading : oracle/xml/parser/v2/XMLByteReader
creating : oracle/xml/parser/v2/XMLByteReader
Error while creating class oracle/xml/parser/v2/XMLByteReader
ORA-29545: badly formed class: User has attempted to load a class (oracle.xml.parser.v2.XMLByteReader) into a restricted package. Permission can be granted using dbms_java.grant_permission(<user>, LoadClassInPackage...
loading : oracle/xml/parser/v2/PrintDriver
creating : oracle/xml/parser/v2/PrintDriver
Error while creating class oracle/xml/parser/v2/PrintDriver
ORA-29545: badly formed class: User has attempted to load a class (oracle.xml.parser.v2.PrintDriver) into a restricted package. Permission can be granted using dbms_java.grant_permission(<user>, LoadClassInPackage...
resolving: oracle/xml/parser/v2/PrintDriver
Error while resolving class oracle/xml/parser/v2/PrintDriver
ORA-04043: object /a065289c_PrintDriver does not exist
resolving: org/w3c/dom/html/HTMLAnchorElement
Error while resolving class org/w3c/dom/html/HTMLAnchorElement
ORA-04043: object /564607d_HTMLAnchorElement does not exist
About 20 classes get loaded correctly. All the rest get ORA-29545 or ORA-04043 errors.
I expect the ORA-04043 errors are a result of the earlier errors.
The documentation seems to indicate that there is no need to do
dbms_java.grant_permission to load into your own schema.
I have NT4 (sp6)
Oracle 8.1.7
xmlparserv2.jar dated 24/8/2001 17:01 size 1,177,259
xmlparserv2_2027.jar gives the same errors.
Any help would be appreciated.
nullWas it definitely xmlparsev2.jar that you had to load?
I recently started going through some of these examples as well and found that the standard xml parser was there but that I needed to load the xml parser for PL/SQL. I did this using loadjava from a subdirectory within the xdk directory and everything worked fine. -
XML parsing problems with Oracle XML parser for PL/SQL
I am using the Oracle XML parser for PL/SQL to transform XML into HTML usign XSL. The parser gives me sporadic errors trying to parse various XML documents. For the same XML source, the XMLPARSER will parse without errors one day and the next day will give me errors such as "invalid char in text", "Expected ';'.", or even Java null pointer exceptions.
I have verified that the XML sources are well formed, so I am pretty certain that the problems I am having are bugs in the XMLPARSER.
Is there going to be a XML parser for PL/SQL version 2 that will fix these bugs? If so, when??? If not, is there anything else I could do to fix these problems?
Thanks!You can use the latest version.
-
Oracle8.1.5 and XML parser for PL/SQL
Hi,
Does XML parser for PL/SQL work with Oracle 8.1.5? Did any one install the
same and if so what are steps to follow? I ran initjvm.sql to install
JServer and then tried to load jar files using loadjava, but it's giving
error. It's working fine with Oracle8.1.6.
Any idea?
Thanks,
Jayanta
null<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Jayanta Ghosh ([email protected]):
Hi,
Does XML parser for PL/SQL work with Oracle 8.1.5? Did any one install the
same and if so what are steps to follow? I ran initjvm.sql to install
JServer and then tried to load jar files using loadjava, but it's giving
error. It's working fine with Oracle8.1.6.
Any idea?
Thanks,
Jayanta<HR></BLOCKQUOTE>
Oracle XML Parser has differents distributions for 8.1.5 and 8.1.6 databases, try the correct version, then runs the oraclexmlsqlload.csh from the lib directory of XSU distribution.
Best regards, Marcelo.
null -
2-byte error in XML Parser for PL/SQL
environment:
oracle 8.1.5
XML parser for Java 2.0.2.6.0
XML parser for PL/SQL 1.0.1.0.0
we use CLOB as xml data container, but it does not work properly with 2 byte chracter set.
I tested same situation except using VARCHAR2 instead of CLOB, it works without problem.
I think there is some bug in method parseClob of oracle.xml.parser.plsql.XMLParserCover about converting CLOB into String.
I appreciate any help to work around this problem.Hi,
We couldn't reproduce this error with our test case. Can you please post a test case that gives you this problem so we can assist you further?
Thank you,
Oracle XML Team -
XML Parser for PL/SQL - charset
Hi,
I'm using XML Parser for PL/SQL and have some trouble with encoding of results xmldom.writeToBuffer and xmldom.writeToCLOB procedures.
Some tags in my DOM documents contain text values in RUSSIAN (server nls_charset is CL8ISO8859P5). When I write document in varchar2 variable, buffer content is in UTF8 encoding ( convert UTF8->CL8ISO8859P5 -OK).
xmldom.setCharset(doc, 'ISO-8859-5') just after xmldom.newDOMDocument has no effect.
xmldom.setCharset(doc, 'CL8ISO8859P5') has no effect also.
Explicit charset direction in third parameter of
xmldom.writeToBuffer and xmldom.writeToCLOB procedure has no effect.
When I write document in CLOB, and then read part of CLOB in varchar2 buffer - result contain '?' in place of all russian text characters.
What's a problem?
How can I force XML Parser write XML in server charset?
Platform:
Oracle8i Enterprise Edition Release 8.1.6.1.0
JServer Release 8.1.6.1.0
Oracle XML Parser for PL/SQL v 1.0.2I have the same problem. But in my case I am allowed only to use XML Parser for PL/SQL.
Characterset 'WE8ISO8859P1' is used. And the language is latvian.
After parsing a XML document and printing its contents, all latvian characters are replaced by "f".
xmldom.setcharset(doc,'WE8ISO8859P1') has no effect. -
Oracle XML Parser for PL/SQL - troubles with charset
Hi,
I'm using Oracle XML Parser for PL/SQL and have some troubles with charset of results xmldom.writeToBuffer and xmldom.writeToCLOB procedures.
Some tags in my DOM documents contain text values in RUSSIAN (server nls_charset is CL8ISO8859P5). When I write document in varchar2 variable, buffer content is in UTF8 charset ( convert UTF8->CL8ISO8859P5 -OK).
xmldom.setCharset(doc, 'ISO-8859-5') just after xmldom.newDOMDocument has no effect.
xmldom.setCharset(doc, 'CL8ISO8859P5') has no effect also.
Explicit charset direction in third parameter of
xmldom.writeToBuffer and xmldom.writeToCLOB procedure has no effect.
When I write document in CLOB, and then read part of CLOB in varchar2 buffer - result contain '?' in place of all russian text characters.
What's a problem?
How can I force XML Parser write XML in server charset?
Oracle XML Parser for PL/SQL v 1.0.2I have the same problem. But in my case I am allowed only to use XML Parser for PL/SQL.
Characterset 'WE8ISO8859P1' is used. And the language is latvian.
After parsing a XML document and printing its contents, all latvian characters are replaced by "f".
xmldom.setcharset(doc,'WE8ISO8859P1') has no effect. -
Is this a bug or a typo of XML Parser for PL/SQL or something else?
Hello,
Below is a piece of codes I copied from the sample that comes with the XML parser for PL/SQL. I found that this sample could not be compiled since:
1- the method printElements takes in a parameter 'doc' of type 'xmldom.DOMDocument'
2- then this 'doc' is refered to in API method
xmldom.getElementsByTagName which takes two parameter, one of type DOMElement, the other of type char.
Are these tow types compatible?
where can i get a better documentation for the XML parser for PLSQ, the one come with the zip fileis not up to date since the miss documentation for DOM. thank you.
BM
-- prints elements in a document
procedure printElements(doc xmldom.DOMDocument) is
nl xmldom.DOMNodeList;
len number;
n xmldom.DOMNode;
begin
-- get all elements
nl := xmldom.getElementsByTagName(doc, '*');
len := xmldom.getLength(nl);
-- loop through elements
for i in 0..len-1 loop
n := xmldom.item(nl, i);
dbms_output.put(xmldom.getNodeName(n) | | ' ');
end loop;
dbms_output.put_line('');
end printElements;public class HelpIcon extends Image
The attached snippets showed it extending "mx:Image.
class HelpIcon extends Image
[Embed(source="/assets/Info.png")]public var thisIcon:Class;
The attached snippets showed a type of class.
Not precisely sure what you are asking. I added the code as you suggested, it still will not honor the click event on the image.
Here is the code modified as you suggested;
public class HelpIcon extends Image
[Embed(source="/assets/Info.png")]
public var thisIcon:Class;
public function HelpIcon()
super();
this.source = new thisIcon();
this.addEventListener(FlexEvent.CREATION_COMPLETE,initHelp)
private function initHelp(event:Event):void
this.removeEventListener(FlexEvent.CREATION_COMPLETE,initHelp);
this.addEventListener(MouseEvent.CLICK, helpClicked,true,5);
It still does not honor the click event.
Paul -
Using XML Parser for PL/SQL in 8.1.7
The XML Parser for PL/SQL is part of 8.1.7,
which is a good thing.
Now my question: What steps do I need to
perfom after installation of 8.1.7 to make
the parser available for my PL/SQL packages,
which call
xmldom.makeNode()
xmldom.appendChild()
xmlparser.newParser()
and other procedures from these packages ?
The schema SYS does not contain the
required packages XMLDOM, XMLPARSER, ...
after installation of 8.1.7.
Do I have to call loadjava and
sqlplus @load.sql extra as in 8.1.5 and
8.1.6 before ?
Of course I'd like to use the natively
compiled XML parser
libjox8_oraclexml_parser_v2.so.
Doesn't the above loadjava override the
installation of this fast parser ?
How can I be safe, that I am using the fast
parser under the PL/SQL cover ?
Tnx for your help
Richard
nullRichard,
That's weird? The packages were installed when I installed 8.1.7. You can just download the latest version of the XDK and reinstall using loadjava and then running the load.sql file to get the packages in. You should use the -f parameter for loadjava to force the new classes to be loaded over the old ones. For code examples and lots of other good tips on using the XDK, check out my new website for everything Oracle and XML at: www.webspedite.com/oracle. -
Oracle 8i XML Parser for PL/SQL
Hi,
Using "Building Oracle XML Applications" by O'reilly, I am
trying to get XML working on an Oracle 8i database. I have done the following steps:
1) verify oracle.xml.parser.v2.DOMParser class is running;
select substr(dbms_java.longname(object_name),1,30) as class, status
from all_objects
where object_type = 'JAVA CLASS'
and object_name = dbms_java.shortname('oracle/xml/parser/v2/DOMParser');
CLASS STATUS
oracle/xml/parser/v2/DOMParser VALID
OK
2) Check for Oracle XML Parser for PL/SQL is installed:
DESCRIBE xmlparser
ERROR:
ORA-04043: object xmlparser does not exist
So apparently i need to download the Oracle XML Parser for PL/SQL.
I cannot locate this download on the oracle site for version 8i (8.1.7.4 specifically).
Any helpers out there?You can use the latest version.
-
Errors installing XML Parser for PL/SQL
I tried to install the parser and get the following errors :
D:\xml\lib\java>loadjava -user user/pwd -r -v xmlparserv2.jar
initialization complete
loading : oracle/xml/parser/v2/XSLResultElement
creating : oracle/xml/parser/v2/XSLResultElement
Error while retrieving errors for oracle/xml/parser/v2/XSLResultElement
ORA-00904: invalid column name
loading : oracle/xml/parser/v2/XSLCopy
creating : oracle/xml/parser/v2/XSLCopy
Error while retrieving errors for oracle/xml/parser/v2/XSLCopy
ORA-00904: invalid column name
loading : oracle/xml/parser/v2/XMLByteReader
creating : oracle/xml/parser/v2/XMLByteReader
Error while retrieving errors for oracle/xml/parser/v2/XMLByteReader
ORA-00904: invalid column name
We have Oracle 8.1.5.0.0 running with JRE 1.1.8 installed.
I updated loadjava.bat to call JRE 1.1.8 instead of JRE 1.1.7.
Can't afford an upgrade to 8.1.6
Any help appreciatedGeoff Hicks (guest) wrote:
: Problems being experienced trying to install the XML parser for
: PL/SQL (zip file plxmlparser_v1_0_0_1_tar.gz).
: We are on Oracle8i (8.1.5.0.0) (with JServer).
: On installing the Oracle XML parser for PL/SQL the following
: errors appear having run the loadjava command line tool for
: xmlparser.jar:-
: loading : META-INF/MANIFEST.MF
: creating : META-INF/MANIFEST.MF
: Error while creating resource META-INF/MANIFEST.MF
: ORA-29547: Java system class not available:
: oracle/aurora/rdbms/Compiler
: loading : xmlparser_1.0.1.4_production
: creating : xmlparser_1.0.1.4_production
: Error while creating resource xmlparser_1.0.1.4_production
: ORA-29547: Java system class not available:
: oracle/aurora/rdbms/Compiler
: Lots of the following resolver errors are returned:-
: resolver :
: Error while resolving class org/w3c/dom/html/HTMLDivElement
: ORA-00904: invalid column name
It looks like you have not initialized JServer in your 8.1.5
database. This needs to be done first.
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
null -
Installation of XML parser for PL/SQL, and XML_SQL
I have just migrated a 7.3.4.4 database to 8.1.7. Please could you tell me what I need to install (and where I would find the software and installation instructions) so that we can use the XML parser for PL/SQL and also XML_SQL. (NB Do I need to install java - and if so, again where would I find the installation software and instructions). Many Thanks.
JennyThe XML Parser for Java comes preinstalled, as does the XML SQL utility.
Assuming your 8.1.7 Oracle home is represented by ?, you need to:
[list=1]
[*]cd ?/xdk/lib
[*]loadjava -v -r -u user/password xmlplsql.jar
[*]cd ?/xdk/plsql/parser/bin
[*]sqlplus user/password @load
[list] -
XDK for PL/SQL and XML Parser for PL/SQL
Is there a difference between the terms:
XDK for PL/SQL
and
XML Parser for PL/SQL V2
or are they the same thing...?
cheers,XDK stands for XML Developer's Kit. There are Oracle XDKs for Java, C, C++, and PL/SQL. These development kits contain building blocks for reading, manipulating, transforming, and viewing XML documents.
XML Parser is one component of XDK. Other components of XDK are
XSLT Processor, XSU, XSQL Servlet, XML Class Generator, etc.
For more information on XDK and its components please refer to:
http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/appdev.920/a96621/adx01bas.htm#1656
Regards,
Anupama
http://otn.oracle.com/sample_code/content.html -
XML Parser for PL/SQL and related issues
I need to have further information about some of the following
issues and XML features and make a determination useful for
evaluation and recommendation:
ISSUES
1) Is there a maximum size for an XML document to provide data
for PL/SQL(or SQL) across tables, provided that no CLOB are used?
2) How about from Oracle to an XML document ?
3) Is there a ratio between XML document size and main memory and
SGA size. What are Oracle's recommendations /
4) Can the Oracle Application Server run on a DHCP NT server when
using XML parsing ? Is it NT Service Pack 3 and 4 compatible ?
5) How parsers can interact with one another or related tools ?
For example, how the XML parser for c/c++ could be useful when
using Pro*C/C++ (programmer 2000) or OCI interfaces ? In other
words, what is the business logic in using these tools ?
nullAnthony D. Noriega (guest) wrote:
: I need to have further information about some of the following
: issues and XML features and make a determination useful for
: evaluation and recommendation:
: ISSUES
: 1) Is there a maximum size for an XML document to provide data
: for PL/SQL(or SQL) across tables, provided that no CLOB are
used?
The limit should be what can be inserted into an object view.
: 2) How about from Oracle to an XML document ?
The limit should be what can be retrieved from an object view.
: 3) Is there a ratio between XML document size and main memory
:and SGA size. What are Oracle's recommendations /
Not directly due to the relationship between XML metadata and
data not being constrained.
: 4) Can the Oracle Application Server run on a DHCP NT server
: when using XML parsing ?
If it can run a JavaVM with the correct permissions there are no
other special requirements.
:Is it NT Service Pack 3 and 4 compatible ?
No special requirements here.
: 5) How parsers can interact with one another or related tools ?
: For example, how the XML parser for c/c++ could be useful when
: using Pro*C/C++ (programmer 2000) or OCI interfaces ? In
other
: words, what is the business logic in using these tools ?
Not really sure of your question. The XML components are useful
in any application where I am processing documents or data with
an XML structure. The choice to use XML can be based on quite a
range of requirements due to its declarative syntax and open
standards. If you give me a specific application, I can perhaps
be more helpful.
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
null
Maybe you are looking for
-
Material group is not updated in EINA
Hi Experts, We are having a situation for EINA table. Whenever a PIR is created with reference to material, its material group is copied from table MARA to PIR, but it is not being updated in EINA table. Where as if PIR is created with refernce to ma
-
Is there a way to control the number of consumed messages from JMS?
Hi everyone, I have a BPEL process that is consumes messages from a foreign queue, performs a transformation, and passes it to Oracle Apps. I'm curious if there is a way to control the number of messages consumed at a time for processing. For example
-
Converting Outlook 2007 email to PDF; Have to reboot PC to convert multiple times
I have an end user who converts multiple emails to PDF for filing purposes. Adobe converts multiple emails in a portfolio style. Email can be seen as in a file at the top and seen seperately ebelow. After 2-3 times Adobe won't convert to portfolio fo
-
Hi All, I have a question. I downloaded the developer addition and installed it. There is a folder called Temp_folder and it has 8 zip files in it. My question is do I have to unzip these files to complete the installation? Any help would be apprecia
-
HT201335 Can I mirror directly from an iphone 5 or 5s to an ipad air?
I know it sounds stupid, but i was curious because there are certain movies, shows, or plainly, just want to use my ipad temporarily to view a movie from my slingbox for example that I can access with my iphone 5s but cant with my ipad air because it