XMLDOM not found
482078Jan 11 2006 — edited Jan 13 2006HI,
I am using oracle 10g. I want to parse an XMLType and retreive the data. I want to use the PL/SQL DOM API for this. I have written a function but its giving me an error the xmldom needs to be declared.
CREATE OR REPLACE FUNCTION getDOMNode(EntitlementRule IN CLOB) RETURN xmldom.domnode IS
-- Declare the local variables
xmldoc CLOB;
myParser xmlparser.Parser;
indomdoc xmldom.domdocument;
outdomdoct xmldom.domdocumenttype;
outnode xmldom.domnode;
BEGIN
-- Get the XML document using the getXML() function defined in the database
xmldoc := EntitlementRule;
-- Get the new xml parser instance
myParser := xmlparser.newParser;
-- Parse the XML document
xmlparser.parseClob(myParser, xmldoc);
-- Get the XML's DOM document
indomdoc := xmlparser.getDocument(myParser);
-- Apply stylesheet to DOM document
outnode := xmldom.makenode(indomdoc);
-- Return the transformed output
return(outnode);
EXCEPTION
WHEN OTHERS THEN
raise_application_error(-20103, 'Exception occurred in getPLSAccountsHTML
Function :'||SQLERRM);
END getDOMNode;
/
Errors for FUNCTION GETDOMNODE:
LINE/COL ERROR
-------- -----------------------------------------------------------------
0/0 PL/SQL: Compilation unit analysis terminated
1/53 PLS-00201: identifier 'XMLDOM.DOMNODE' must be declared
I was not logged in as XDB user. i thought this might be the problem. So logged in as sys and tried to grant permissions on XMLDOM packages but its giving me
grant execute on XMLDOM to public;
grant execute on XMLDOM to public
*
ERROR at line 1:
ORA-04042: procedure, function, package, or package body does not exist
This means XMLDOM itself is not found....
Please Help!!!!!!!!!!!!!!!