NLS support in xmlparser for pl/sql??

Hi,
I am not able to create a DOMNode with NLS-Text between the tags of the node. I am using the Oracle xml parser for pl/sql. All I need to do is create the node - "<wish>Good Morning</wish>". The value - "Good Morning" needs to come from a variable of type nvarchar2. A call to the function xmldom.createTextNode gives the following compile time error - PLS-00561: character set mismatch on value for parameter 'DATA', which literally means that the "DATA" formal parameter takes in only a varchar2 and not an nvarchar2. I could not find any other function to create a text node, which accepts an nvarchar2 data. Does this mean that the xmlparser for pl/sql does not support NLS? Please help.
Thanks in advance,
Vincent Morris.
Procedure used for creating the node:
create or replace procedure create_mynode is
nls_text nvarchar2(50);
doc xmldom.DOMDocument;
node xmldom.DOMNode;
element xmldom.DOMElement;
text xmldom.DOMText;
text_node xmldom.DOMNode;
dummy xmldom.DOMNode;
begin
/* code for getting a DOMDocument into the variable doc
nls_text:=n'Good Morning';
element:=xmldom.createElement(doc, 'wish');
node:=xmldom.makeNode(element);
text:=xmldom.createTextNode(doc, nls_text); -- ERROR ON THIS LINE
text_node:=xmldom.makeNode(text);
dummy:=xmldom.appendChild(node,text_node);
/* code for printing the tagname and value of the node contained in the variable 'node'
end;

declare
doc xmldom.DOMDocument;
nl xmldom.DOMNodeList;
n xmldom.DOMNode;
t xmldom.DOMNode;
val VARCHAR2(30);
begin
doc := xmlparser.getDocument(p);
nl := xmldom.getElementsByTagName(doc, '*');
n := xmldom.item(nl, 1);
t := xmldom.getFirstChild(n);
val := UPPER(xmldom.getNodeValue(t));
end;

Similar Messages

  • 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).

  • Installing xmlparser for PL/SQL.

    I am installing the newest version of the Oracle xmlparser for
    PL/SQL, version 1.0.2.0.0, and I have a question. How can I
    install this tool into the database so that all users have access
    to the many objects it creates? In affect, I want to do a "public"
    installation rather than install it under multiple users.
    If this is not possible, then what commands to I need to
    execute to give public access to objects like "JAVA CLASS",
    etc.
    Thanks,
    - Jai

    I too would like to know. I just installed the XML Utilities and the only user who can see all of the code is SYSTEM.

  • Using XMLParser for PL/SQL

    I am using DBMS_XMLParser in Oracle 10g to parse an XML. The code is as follows:
    CREATE OR REPLACE procedure xml_main is
    P DBMS_XMLPARSER.Parser;
    DOC CLOB;
    v_xmldoc DBMS_XMLDOM.DOMDocument;
    v_out CLOB;
    BEGIN
    P := DBMS_XMLPARSER.newParser;
    DBMS_XMLPARSER.setValidationMode(p, FALSE);
    DOC := '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <com.welligent.Student.BasicStudent.Create>
    <ControlAreaSync messageCategory="com.welligent.Student" messageObject="BasicStudent" messageAction="Create" messageRelease="1.0" messagePriority="1" messageType="Sync">
    <Sender>
    <MessageId>
    <SenderAppId>com.openii.SyncRouter</SenderAppId>
    <ProducerId>a72af712-90ea-43be-b958-077a87a29bfb</ProducerId>
    <MessageSeq>53</MessageSeq>
    </MessageId>
    <Authentication>
    <AuthUserId>Router</AuthUserId>
    </Authentication>
    </Sender>
    <Datetime>
    <Year>2001</Year>
    <Month>3</Month>
    <Day>23</Day>
    <Hour>13</Hour>
    <Minute>47</Minute>
    <Second>30</Second>
    <SubSecond>223</SubSecond>
    <Timezone>6:00-GMT</Timezone>
    </Datetime>
    </ControlAreaSync>
    <DataArea>
    <NewData>
    <BasicStudent mealCode="" usBorn="Yes" migrant="No" workAbility="No" ellStatus="">
    <StudentNumber>052589F201</StudentNumber>
    <ExternalIdNumber>1234567890</ExternalIdNumber>
    <StateIdNumber>123456</StateIdNumber>
    <Name>
    <LastName>Lopez</LastName>
    <FirstName>Maria</FirstName>
    <MiddleName>S</MiddleName>
    </Name>
    <Gender>Female</Gender>
    <BirthDate>
    <Month>1</Month>
    <Day>1</Day>
    <Year>1995</Year>
    </BirthDate>
    <Race>Hispanic</Race>
    <Ethnicity>Hispanic</Ethnicity>
    <PrimaryLanguage>English</PrimaryLanguage>
    <HouseholdLanguage>Spanish</HouseholdLanguage>
    <Address>
    <Street>123 Any Street</Street>
    <ApartmentNumber>12-D</ApartmentNumber>
    <City>Los Angeles</City>
    <County>Los Angeles</County>
    <State>CA</State>
    <ZipCode>90071</ZipCode>
    </Address>
    </BasicStudent>
    </NewData>
    </DataArea>
    </com.welligent.Student.BasicStudent.Create>';
    DBMS_XMLPARSER.PARSECLOB ( P, DOC );
    v_xmldoc := DBMS_XMLPARSER.getDocument(P);
    printElementAttributes(v_xmldoc);
    exception
    when DBMS_XMLDOM.INDEX_SIZE_ERR then
    raise_application_error(-20120, 'Index Size error');
    when DBMS_XMLDOM.DOMSTRING_SIZE_ERR then
    raise_application_error(-20120, 'String Size error');
    when DBMS_XMLDOM.HIERARCHY_REQUEST_ERR then
    raise_application_error(-20120, 'Hierarchy request error');
    when DBMS_XMLDOM.WRONG_DOCUMENT_ERR then
    raise_application_error(-20120, 'Wrong doc error');
    when DBMS_XMLDOM.INVALID_CHARACTER_ERR then
    raise_application_error(-20120, 'Invalid Char error');
    when DBMS_XMLDOM.NO_DATA_ALLOWED_ERR then
    raise_application_error(-20120, 'Nod data allowed error');
    when DBMS_XMLDOM.NO_MODIFICATION_ALLOWED_ERR then
    raise_application_error(-20120, 'No mod allowed error');
    when DBMS_XMLDOM.NOT_FOUND_ERR then
    raise_application_error(-20120, 'Not found error');
    when DBMS_XMLDOM.NOT_SUPPORTED_ERR then
    raise_application_error(-20120, 'Not supported error');
    when DBMS_XMLDOM.INUSE_ATTRIBUTE_ERR then
    raise_application_error(-20120, 'In use attr error');
    END;
    CREATE OR REPLACE procedure printElementAttributes(doc DBMS_XMLDOM.DOMDocument) is
    nl DBMS_XMLDOM.DOMNODELIST;
    len1 NUMBER;
    len2 NUMBER;
    n DBMS_XMLDOM.DOMNODE;
    e DBMS_XMLDOM.DOMELEMENT;
    nnm DBMS_XMLDOM.DOMNAMEDNODEMAP;
    attrname VARCHAR2(100);
    attrval VARCHAR2(100);
    text_value VARCHAR2(100):=NULL;
    n_child DBMS_XMLDOM.DOMNODE;
    BEGIN
    -- get all elements
    nl := DBMS_XMLDOM.getElementsByTagName(doc, '*');
    len1 := DBMS_XMLDOM.getLength(nl);
    -- loop through elements
    FOR j in 0..len1-1 LOOP
    n := DBMS_XMLDOM.item(nl, j);
    e := DBMS_XMLDOM.makeElement(n);
    DBMS_OUTPUT.PUT_LINE(DBMS_XMLDOM.getTagName(e) || ':');
    -- get all attributes of element
    nnm := DBMS_XMLDOM.getAttributes(n);
    n_child:=DBMS_XMLDOM.getFirstChild(n);
    text_value:=DBMS_XMLDOM.getNodeValue(n_child);
    dbms_output.put_line('val='||text_value);
    IF (DBMS_XMLDOM.isNull(nnm) = FALSE) THEN
    len2 := DBMS_XMLDOM.getLength(nnm);
    dbms_output.put_line('length='||len2);
    -- loop through attributes
    FOR i IN 0..len2-1 LOOP
    n := DBMS_XMLDOM.item(nnm, i);
    attrname := DBMS_XMLDOM.getNodeName(n);
    attrval := DBMS_XMLDOM.getNodeValue(n);
    dbms_output.put(' ' || attrname || ' = ' || attrval);
    END LOOP;
    dbms_output.put_line('');
    END IF;
    END LOOP;
    END printElementAttributes;
    While executing the xml_main proc from an anonymous block, I am getting the following error:
    ORA-04063: package body "XDB.DBMS_XMLPARSER" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "XDB.DBMS_XMLPARSER"
    ORA-06512: at "BALB.XML_MAIN", line 9
    ORA-06512: at line 2
    I've checked that the XDB is installed in my database by running the below query and getting the output
    select comp_name, version, status
    from dba_registry
    where comp_name like '%XML%';
    COMP_NAME VERSION STATUS
    Oracle XML Database 10.2.0.2.0 VALID
    1 row selected.
    Please let me know a way out to resolve it?

    Ramesh,
    Have you referred to the samples provided in the 8.1.7 doc section at :
    http://technet.oracle.com/docs/products/oracle8i/doc_library/817_doc/appdev.817/a86030/adx24pap.htm
    In the above page, the link, "Using XML Parser for PL/SQL Examples in sample/" has sample code on using the
    xmlparser, xmldom and xslprocessor packages. These samples are provided as demos with the XDK s/w that
    normally gets installed in your ORACLE817_HOME/xdk directory.
    Hope that helps.
    -Srinivas

  • XMLParser for PL/SQL ORA-20100 Problem

    I am using XML parser for PL/SQL in Oracle9i Enterprise Edition Release 9.0.1.1.1
    When i run the sample xml program, i get error which is as follows. While compiling no errors. But while executing it reports error as given below.
    SQL> execute domsample('c:\xml', 'family.xml', 'errors.txt');
    begin domsample('c:\xml', 'family.xml', 'errors.txt'); end;
    ORA-20100: Error occurred while parsing: No such file or directory
    ORA-06512: at "COMMODITYBACKCONNECT.XMLPARSER", line 22
    ORA-06512: at "COMMODITYBACKCONNECT.XMLPARSER", line 79
    ORA-06512: at "COMMODITYBACKCONNECT.DOMSAMPLE", line 80
    ORA-06512: at line 1
    What need to be done to rectify the above problem.
    when i do the following validation check
    SQL>
    SQL> select substr(dbms_java.longname(object_name),1,30) as class, status
    2 from all_objects
    3 where object_type = 'JAVA CLASS'
    4 and object_name = dbms_java.shortname('oracle/xml/parser/v2/DOMParser')
    5 ;
    CLASS STATUS
    oracle/xml/parser/v2/DOMParser VALID
    oracle/xml/parser/v2/DOMParser VALID
    Please advice to how remove the following error:
    ORA-20100: Error occurred while parsing: No such file or directory

    Hi, I have run into the same problem. I think the parser is looking for c:\XML on your sever instead of your local drive. Try creating a dir on the server called \xml and rerunning the script. I don't know whether it will fix your problem, as i am sitting with the same thing, but it is a step in the right direction. Also check your separators. If you are running unix servers use / instead of \

  • XMLParser for PL/SQL

    I am using XML parser for PL/SQL in Oracle9i Enterprise Edition Release 9.0.1.1.1
    When i run the sample xml program, i get error which is as follows. While compiling no errors. But while executing it reports error as given below.
    SQL> execute domsample('c:\xml', 'family.xml', 'errors.txt');
    begin domsample('c:\xml', 'family.xml', 'errors.txt'); end;
    ORA-20100: Error occurred while parsing: No such file or directory
    ORA-06512: at "COMMODITYBACKCONNECT.XMLPARSER", line 22
    ORA-06512: at "COMMODITYBACKCONNECT.XMLPARSER", line 79
    ORA-06512: at "COMMODITYBACKCONNECT.DOMSAMPLE", line 80
    ORA-06512: at line 1
    What need to be done to rectify the above problem.
    when i do the following validation check
    SQL>
    SQL> select substr(dbms_java.longname(object_name),1,30) as class, status
    2 from all_objects
    3 where object_type = 'JAVA CLASS'
    4 and object_name = dbms_java.shortname('oracle/xml/parser/v2/DOMParser')
    5 ;
    CLASS STATUS
    oracle/xml/parser/v2/DOMParser VALID
    oracle/xml/parser/v2/DOMParser VALID
    Please advice to how remove the following error:
    ORA-20100: Error occurred while parsing: No such file or directory

    This should be that you haven't load the xmlparserv2.jar into the DB schema. You can load the java libs using loadjava command

  • XMLParser for PL/SQL ORA-20100

    I am using XML parser for PL/SQL in Oracle9i Enterprise Edition Release 9.0.1.1.1
    When i run the sample xml program, i get error which is as follows. While compiling no errors. But while executing it reports error as given below.
    SQL> execute domsample('c:\xml', 'family.xml', 'errors.txt');
    begin domsample('c:\xml', 'family.xml', 'errors.txt'); end;
    ORA-20100: Error occurred while parsing: No such file or directory
    ORA-06512: at "COMMODITYBACKCONNECT.XMLPARSER", line 22
    ORA-06512: at "COMMODITYBACKCONNECT.XMLPARSER", line 79
    ORA-06512: at "COMMODITYBACKCONNECT.DOMSAMPLE", line 80
    ORA-06512: at line 1
    What need to be done to rectify the above problem.
    when i do the following validation check
    SQL>
    SQL> select substr(dbms_java.longname(object_name),1,30) as class, status
    2 from all_objects
    3 where object_type = 'JAVA CLASS'
    4 and object_name = dbms_java.shortname('oracle/xml/parser/v2/DOMParser')
    5 ;
    CLASS STATUS
    oracle/xml/parser/v2/DOMParser VALID
    oracle/xml/parser/v2/DOMParser VALID
    Please advice to how remove the following error:
    ORA-20100: Error occurred while parsing: No such file or directory

    Hi, I have run into the same problem. I think the parser is looking for c:\XML on your sever instead of your local drive. Try creating a dir on the server called \xml and rerunning the script. I don't know whether it will fix your problem, as i am sitting with the same thing, but it is a step in the right direction. Also check your separators. If you are running unix servers use / instead of \

  • XMLParser for PL/SQL - Error

    I am using XML parser for PL/SQL in oracle 8.1.7 DB.
    When i run the sample xml program, i get error which is as follows. While compiling no errors. But while executing it reports error as given below.
    SQL> exec domsample('/u01/usr/oracle/sso','family.xml','errors.txt');
    BEGIN domsample('/u01/usr/oracle/sso','family.xml','errors.txt'); END;
    ERROR at line 1:
    ORA-29540: class oracle/xml/parser/plsql/XMLParserCover does not exist
    ORA-06512: at "PACKMGR.XMLPARSERCOVER", line 0
    ORA-06512: at "PACKMGR.XMLPARSER", line 57
    ORA-06512: at "PACKMGR.DOMSAMPLE", line 72
    ORA-06512: at line 1
    What need to be done to rectify the above problem.
    when i do the following validation check
    SQL> select substr(dbms_java.longname(object_name),1,30) as class, status
    2 from all_objects
    3 where object_type = 'JAVA CLASS'
    4 and object_name = dbms_java.shortname('oracle/xml/parser/v2/DOMParser');
    from all_objects
    ERROR at line 2:
    ORA-29540: class oracle/aurora/rdbms/DbmsJava does not exist
    I get the above error. Pls. Advice

    This should be that you haven't load the xmlparserv2.jar into the DB schema. You can load the java libs using loadjava command

  • Probs with XMLParser for PL/SQL

    Oracle 8.1.6, Solaris.
    XMLParser v 1.0.2.
    While loading the java archive named xmlparserv2.jar with the loadjava command, I constantly get the message
    ORA-29547: Java system class not available: oracle/aurora/rdbms/Compiler
    for some classes
    can somebody tell me why?
    I've pointed my CLASSPATH to the aurora.zip archive, but it won't work!
    Please help, thanx!

    It sounds like you have not properly run initjvm.sql to initialize the Oracle 8i JVM.
    This needs to be done first before LoadJava will work.
    Oracle XML Team
    null

  • Error whilst installing XMLParser for PL/SQL

    Oracle 8.1.6, AIX
    While installing the java archive named xmlparserv2.jar, I constantly get the message:
    ORA-29547: Java system class not available: oracle/aurora/rdbms/Compiler
    can somebody tell me why? I've tried to check my classpatch in all the ways I could think of, but nothing worked. is this class supposed to be in the rdbms or in the classpath.
    If so, in which archive?

    Have you run the initjvm.sql file after creating the database.
    The script can be run manually (as SYS) (located in ORACLE_HOME/rdbms/admin). When this script is run, it loads the required java classes the database.
    After this run another script initplsj.sql (located in ORACLE_HOME/rdbms/admin).

  • Contents in XMLParser for PL/SQL

    How do you get the contents between tags in a XML document?
    example:
    <ejb name="My bean">
    <maximum-pool-size>20</maximum-pool-size>
    </ejb>
    I want the "20"-value.
    How do your extract this from a node in a DOM tree?
    thanx.

    declare
    doc xmldom.DOMDocument;
    nl xmldom.DOMNodeList;
    n xmldom.DOMNode;
    t xmldom.DOMNode;
    val VARCHAR2(30);
    begin
    doc := xmlparser.getDocument(p);
    nl := xmldom.getElementsByTagName(doc, '*');
    n := xmldom.item(nl, 1);
    t := xmldom.getFirstChild(n);
    val := UPPER(xmldom.getNodeValue(t));
    end;

  • NLS SUPPORT FOR ORACLE 8I

    I am trying to use the NLS support of Oracle 8i on windows
    Nt/2000 platforms. I have tried configuring the database
    characterset and the national character set as 'IN8ISCII' - the
    one prescribed in the NLS documentation for India territory and
    Hindi as NLS Language and territory parameters. I have also
    tried configuring them as 'UTF8' a character set prescribed for
    unicode /universal 8 bits ASCII character sets but i am not able
    to insert any rows with these charactersets in NCHAR or NVARCHAR
    columns. if i try to insert them in regualr char pr varchar
    columns i can insert in the ascii formats and I have to retreive
    them on front end through different mask format fonts.
    If any one have tried the NLS support pls let me know how to
    insert the records and retreive thenm in the national language..
    Thanks in advance..
    Manoj Mehta

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Glen Fafara ([email protected]):
    Will Oracle 8i run on an Alpha based machine? I am running Redhat Linux 6.2.
    Thanks
    Glen<HR></BLOCKQUOTE>
    hi:
    I am coming from Taiwan,
    There's a problem,I installed O8iee(linux)
    on Redhat Linux 6.2,when($svrmgrl)...
    error occure:
    Oracle Server Manager Release 3.1.6.0.0 - Production
    Copyright (c) 1997, 1999, Oracle Corporation. All Rights Reserved.
    ORA-03113: end-of-file on communication channel
    would you help me
    my e-mail:[email protected]
    thanks a lot.

  • Support for suing sql directly.

    Hi All,
    I'm new to Kodo, does it support using native sql in JDOQL? that is,
    directly coding my queries in sql and passing them to JDOQL to parse and
    execute?
    If not available, is there any plans to integrate this feature or similar
    ones ?
    thanks.

    Just to clarify, Kodo supports using SQL at every level:
    1) JDOQL/Query - Query Extensions
    2) Custom Result Object Provider - issue total custom SQL queries
    2) Mapping - See our customSQL for examples
    Stephen Kim wrote:
    There is no direct support for using SQL however most of our users can
    accomplish the same thing using our Query Extensions (see our docs)
    which allow you embed an entire where clause if so desired.
    I think using SQL -instead- of JDOQL is on the project plan but I'm not
    sure of the time frame.
    Also, note that one can usually get around this limitation by using
    Custom Object Provider. See the customSQL sample included in the
    distribution for examples of this. This example includes a number of
    different examples, but the main one to note is the
    PersonResultObjectProvider portion.
    Amr Noaman Abdel-Hamid wrote:
    Hi All,
    I'm new to Kodo, does it support using native sql in JDOQL? that is,
    directly coding my queries in sql and passing them to JDOQL to parse and
    execute?
    If not available, is there any plans to integrate this feature or similar
    ones ?
    thanks.
    Stephen Kim
    [email protected]
    SolarMetric, Inc.
    http://www.solarmetric.com

  • ODI's CDC Support for MS SQL Server 2000

    Hi,
    Does ODI provides CDC with log for MS SQL Server 2000? I read somewhere that we need to get a separately priced adapter for this because ODI supports only trigger based CDC for MS SQL Server 2000 and 2005.
    Could anyone please shed some light on this?
    Thank you.

    Hi,
    Are you able to find out any info on this?
    Appreciate your help on any leads..
    Regards
    Naveen

  • Support for Sybase SQL Anywhere databases

    Is there support for Sybase SQL Anywhere databases available?
    Specifically, using an ODBC connection.
    Sybase, curiously enough, does not want to develop specific drivers for connection to its databases; instead, it relies on an outside source (ODBC) for its connection.
    I am NOT in favour of using ODBC as an connection method; we have bench-marked SQL query performance using both native driver connection vs ODBC connection; you should be easily able to guess which approach won out!!
    Hint: Oracle dramatically!!

    You can try using JTDS, it should work with Sysbase too and if you take a look at the SQL Developer certifications, you can see it's the certified way of speaking with Sysbase.
    I've never used this myself and i'm not even sure if this works with SQL Anywhere but it's worth a try.

Maybe you are looking for

  • SIP trunking monitoring and usage report

    Hello all, Recently the IP telephony system has migrated to SIP trunking from PRI.   SIP trunking is running on CUBE 2900 serials. Could anyone advise the following?    much appreciate it. .  SIP trunking monitoring :      If MIB needed,   any brief

  • ISE Renaming External AD Group

    Hi, I am testing ISE External AD authentication and when I rename an AD security group that the user is a member of authentication against ISE is still successful, however the group name shown in the logs is the original group name and not the new re

  • Pass continuous discrete averages out of loop

    Hi, I have a DAQ that's acquiring 1 sample at 1 Hz. I am trying to get the program to continuously acquire samples but to output the average of every 10 samples, which I use at a later point in the program for calculations. I have found a lot of topi

  • Using iPod as a field recorder (and no its not in the wrong forum)

    How about this as a field recorder... http://www.bluemic.com/mikey/ Make sure you watch the video Anybody use one of these yet?

  • Epson CX4800 Won't Print In OSX Mavericks

    I just upgraded to Mavericks. Now my Epson CX4800 won't print. I donloaded the Epson Printer Software Update (2.17) through the App Store Updates. I can print test pages through the Epson Printer Utility 4, but when I try and print any document from