XMLPARSER.parseCLOB Error

Hi all, i'm having a little trouble working with XML in pl SQL could somebody please help me? I'm the biggest noob
here is a sample of what i'm doing:
FUNCTION getXML(IdSP IN NUMBER) RETURN CLOB
is
p xmlparser.parser;
dadosAvaria dbms_xmlgen.ctxHandle;
result CLOB;
begin
dadosAvaria := dbms_xmlgen.newContext('SELECT
Id_Avaria,
num_posto,
ps,
CCO_1,
CCO_2,
Operacao,
Sub_Operacao,
AEL_A,
Servico,
def_distr,
sub_esp from r_avari1 where id_equipa = ' || IdSP);
DBMS_XMLGen.setRowTag(dadosAvaria, 'R_Acti_API_SP');
DBMS_XMLGen.SETROWSETTAG(dadosAvaria, 'ListagemAvarias');
result := DBMS_XMLgen.getXML(dadosAvaria);
p := xmlparser.newparser;
xmlparser.parseclob(p, result);
the error is what follows:
ORA-20103: Null input is not allowed
ORA-06512: at "SYS.XMLPARSER", line 33
ORA-06512: at "SYS.XMLPARSER", line 99
ORA-06512: at "PSINGLRP.PK_BD_SS_XML_SP", line 93 <---- This the line that has the PARSECLOB Statement
ORA-06512: at line 4
why does this happens, it should work right?
I'm using Oracle 9i does anybody knows where can i get more information? Pleasy it is very important and i can't seem to make a correct XML document from a query...
Thank You
Best Regards
João Lopes
Edited by: Joao Lopes on 2/Jul/2009 6:21

Hi again, sorry about the absence.
if result is not null then
xmlparser.parseclob(parserXML, result);
doc := xmlparser.getdocument(parserXML);
xmlparser.freeparser(parserXML);
nl := xmldom.getElementsByTagName(doc, 'ListagemAvarias');
numeroOcorrencias := xmldom.getLength(nl);
end if;
I added this code to my procedure, it seams that he detects result is null. But in the end of my procedure i added a print clob statement wich is
xmlstr := dbms_lob.SUBSTR(result,32767);
loop
exit when xmlstr is null;
line := substr(xmlstr,1,instr(xmlstr,chr(10))-1);
dbms_output.put_line('| '||line);
xmlstr := substr(xmlstr,instr(xmlstr,chr(10))+1);
end loop;
The strangest thing is that it prints the value o result in the above statement, but it detects null on the xmlparser
:S

Similar Messages

  • XMLPARSER.parseClob(v_parser, w2_data_clob); returns ORA-20100: Error

    I have a script that calls an output file and reads it into a clob. this portion seems to work fine. I next try to do a XMLPARSER.parseClob(v_parser, w2_data_clob);, but I get the following error:
    ORA-20100: Error occurred while parsing: Expected 'EOF'.
    I am attaching script and output file data. Any and all help is greatly appreciated:
    SET SERVEROUTPUT ON SIZE 100000;
    SET LINESIZE 1000;
    SET DEFINE OFF;
    DECLARE
    file_handle utl_file.FILE_TYPE;
    eof boolean := FALSE;
    retrieved_buffer VARCHAR2(2000);
    dir_name VARCHAR2(240) := cfa_lookup.meaning('APP_BASEPATH','APPLCSF') || '/out';
    file_name VARCHAR2(40) := 'o36841443.xml';
    w2_data_clob CLOB;
    w2_data_clob_out CLOB;
    v_loop_counter INTEGER := 0;
    v_parser xmlparser.parser;
    v_document xmldom.DOMDocument;
    v_length INTEGER := 0;
    v_clob_length INTEGER := 0;
    v_nodelist xmldom.DOMNodeList;
    v_node xmldom.DOMNode;
    v_new_node xmldom.DOMNode;
    v_parent_node xmldom.DOMNode;
    v_record_node XMLDOM.DOMNode;
    avalue xmldom.DOMNode;
    v_new_element xmldom.DOMElement;
    v_new_element_node xmldom.DOMNode;
    v_new_text xmldom.DOMText;
    v_new_text_node xmldom.DOMNode;
    v_employee_id INTEGER;
    v_employer_name hr_organization_units.name%TYPE;
    v_address_line_1 hr_locations.address_line_1%TYPE;
    v_address_line_2 hr_locations.address_line_2%TYPE;
    v_address_line_3 hr_locations.address_line_3%TYPE;
    v_town_or_city hr_locations.town_or_city%TYPE;
    v_region_2 hr_locations.region_2%TYPE;
    v_postal_code hr_locations.postal_code%TYPE;
    v_status INTEGER;
    v_bytes_remaining INTEGER;
    v_current_offset INTEGER;
    v_next_lf_offset INTEGER;
    v_X_offset INTEGER DEFAULT 1;
    v_bytes_to_read INTEGER;
    v_end_of_clob BOOLEAN;
    v_line_number INTEGER;
    v_line VARCHAR2(2000);
    v_bytes_remaining_g_emp INTEGER;
    v_current_offset_g_emp INTEGER;
    v_next_offset_g_emp INTEGER;
    v_bytes_to_read_g_emp INTEGER;
    v_end_of_g_emp BOOLEAN;
    v_amount NUMBER DEFAULT 32000;
    x VARCHAR2(32760);
    v_lf INTEGER;
    e_line_too_long EXCEPTION;
    BEGIN
    DBMS_OUTPUT.PUT_LINE ('Begin process');
    file_handle := utl_file.fopen(dir_name, file_name, 'r');
    IF utl_file.is_open(file_handle) THEN
    DBMS_OUTPUT.PUT_LINE ('File is open');
    END IF;
    BEGIN
    -- Copy w2 xml data file to CLOB
    dbms_lob.createtemporary(w2_data_clob,true,dbms_lob.session);
    DBMS_LOB.OPEN(w2_data_clob, DBMS_LOB.LOB_READWRITE);
    v_clob_length := DBMS_LOB.GETLENGTH(w2_data_clob);
    BEGIN
    LOOP
    utl_file.get_line(file_handle, retrieved_buffer);
    IF NVL(lENGTH(retrieved_buffer),-1) <> -1 THEN
    v_loop_counter := v_loop_counter + 1;
    -- retrieved_buffer := retrieved_buffer || chr(10);
    DBMS_OUTPUT.put_line(v_loop_counter||' '||NVL(LENGTH(RTRIM(retrieved_buffer)),-1)||' ' ||ASCII(SUBSTR(RTRIM(retrieved_buffer),-1,1))||' '||rtrim(retrieved_buffer));
    DBMS_LOB.WRITEAPPEND(w2_data_clob, LENGTH(RTRIM(retrieved_buffer)), RTRIM(retrieved_buffer) );
    ELSE
    DBMS_OUTPUT.put_line('retrieved_buffer IS NULL');
    -- DBMS_LOB.WRITEAPPEND(w2_data_clob, LENGTH(1), ASCII(CHR(13)) );
    END if;
    END LOOP;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    DBMS_OUTPUT.PUT_LINE ('last line read: '||retrieved_buffer);
    DBMS_OUTPUT.PUT_LINE ('no more data in loop: '||SQLERRM);
    -- DBMS_LOB.WRITEAPPEN(w2_data_clob, 1,CHR(10));
    -- DBMS_OUTPUT.put_line(chr(13));
    DBMS_LOB.CLOSE(w2_data_clob);
    WHEN OTHERS THEN
    NULL;
    DBMS_OUTPUT.PUT_LINE ('ERROR in loop: '||SQLERRM);
    END;
    v_clob_length := DBMS_LOB.GETLENGTH(w2_data_clob);
    DBMS_OUTPUT.PUT_LINE ('v_clob_length: '||v_clob_length);
    UTL_FILE.FCLOSE (file_handle);
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE ('ERROR...'||SQLERRM);
    END;
    DBMS_OUTPUT.PUT_LINE ('last line read: '||retrieved_buffer);
    DBMS_OUTPUT.PUT_LINE ('Number of lines written to CLOB: '|| v_loop_counter);
    v_parser := XMLPARSER.newParser;
    XMLPARSER.setValidationMode(v_parser, FALSE);
    DBMS_OUTPUT.PUT_LINE ('10');
    XMLPARSER.parseClob(v_parser, w2_data_clob);
    DBMS_OUTPUT.PUT_LINE ('20');
    v_document := XMLPARSER.getDocument(v_parser);
    DBMS_OUTPUT.PUT_LINE ('30');
    utl_file.fclose(file_handle);
    DBMS_OUTPUT.PUT_LINE('Process Complete');
    EXCEPTION
    WHEN UTL_FILE.INVALID_PATH
    THEN DBMS_OUTPUT.PUT_LINE ('invalid_path');
    WHEN UTL_FILE.INVALID_MODE
    THEN DBMS_OUTPUT.PUT_LINE ('invalid_mode');
    WHEN UTL_FILE.INVALID_FILEHANDLE
    THEN DBMS_OUTPUT.PUT_LINE ('invalid_filehandle');
    WHEN UTL_FILE.INVALID_OPERATION
    THEN DBMS_OUTPUT.PUT_LINE('invalid_operation');
    WHEN UTL_FILE.READ_ERROR
    THEN DBMS_OUTPUT.PUT_LINE('read_error');
    WHEN UTL_FILE.WRITE_ERROR
    THEN DBMS_OUTPUT.PUT_LINE ('write_error');
    WHEN UTL_FILE.INTERNAL_ERROR
    THEN DBMS_OUTPUT.PUT_LINE ('internal_error');
    WHEN OTHERS
    THEN dbms_output.put_line(SQLERRM);
    END;
    <Version_Number> Version 1.1
    </Version_Number>
    <xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi">
    <xapi:request>
    <xapi:delivery>
    <xapi:filesystem output="/u100/applcsf/dcfap/log/o0285647.tmp" />
    </xapi:delivery>
    <xapi:document output-type="pdf">
    <xapi:template type="pdf" location="${templateName1}">
    <xapi:data>
    <w2>
    <control_number>993536284</control_number>
    <federal_ein>54-1234567</federal_ein>
    <employer_name>Charles D Guf</employer_name>
    <employer_address>Chicken House/Rutherford Crossing FSU
    176 Monket St
    Winchester VA 22603</employer_address>
    <ssn>213-99-9999</ssn>
    <emp_name>Darnell </emp_name>
    <last_name>Simpson</last_name>
    <emp_suffix></emp_suffix>
    <employee_address>3981 Water Lane
    Winchester VA 22602</employee_address>
    <wages_tips_compensation>14299.41</wages_tips_compensation>
    <fit_withheld>464.93</fit_withheld>
    <ss_wages>14949.41</ss_wages>
    <ss_withheld>926.87</ss_withheld>
    <med_wages>14949.41</med_wages>
    <med_withheld>216.75</med_withheld>
    <ss_tips></ss_tips>
    <allocated_tips></allocated_tips>
    <eic_payment></eic_payment>
    <dependent_care></dependent_care>
    <non_qual_plan></non_qual_plan>
    <stat_employee>N</stat_employee>
    <retirement_plan>Y</retirement_plan>
    <sick_pay>N</sick_pay>
    <box14_codea></box14_codea>
    <box14_meaninga></box14_meaninga>
    <box14_codeb></box14_codeb>
    <box14_meaningb></box14_meaningb>
    <box14_codec></box14_codec>
    <box14_meaningc></box14_meaningc>
    <box12_codea>D</box12_codea>
    <box12_meaninga>650</box12_meaninga>
    <box12_codeb></box12_codeb>
    <box12_meaningb></box12_meaningb>
    <box12_codec></box12_codec>
    <box12_meaningc></box12_meaningc>
    <box12_coded></box12_coded>
    <box12_meaningd></box12_meaningd>
    <state1_code>VA</state1_code>
    <state1_ein>30-541252257F-001</state1_ein>
    <state1_wages> 14299.41</state1_wages>
    <state1_tax> 388.49</state1_tax>
    <local1_wages></local1_wages>
    <local1_tax></local1_tax>
    <locality1></locality1>
    <state2_code></state2_code>
    <state2_ein></state2_ein>
    <state2_wages></state2_wages>
    <state2_tax></state2_tax>
    <local2_wages></local2_wages>
    <local2_tax></local2_tax>
    <locality2></locality2>
    <year>2008</year>
    <amended></amended>
    <amended_date></amended_date>
    <print_instruction>N</print_instruction>
    </w2>
    </xapi:data>
    </xapi:template>
    <xapi:template type="pdf" location="${templateName2}">
    <xapi:data />
    </xapi:template>
    </xapi:document>
    </xapi:request>
    </xapi:requestset>

    Well thats the problem - the parser is parsng the clob and is not finding valid XML. It will succeed with
    <Version_Number> Version 1.1
    </Version_Number>
    because, although small its valid XML.
    Im surprised that is the seeded XML from the HRMS team. Have you tried something like SQLDeveloper to look at the contents of the CLOB? Just to ensure your plsql is pulling all of the data out?
    If everything else checks out, I would get an SR logged with Payroll (HRMS) - this is not a BIP issue per se but invalid XML from the HR dev team.
    Regards
    tim

  • Xmlparser.parse error: No such file or directory

    Hello,
    Please forgive me if this has already been answered, but I did quite a bit of searching and could not find any resolved threads on this matter.
    I'm getting the following error from my call to xmlparser.parse(parser, Path || File);
    ERROR at line 1:
    ORA-20100: Error occurred while parsing: No such file or directory
    ORA-06512: at "SYS.XMLPARSER", line 22
    ORA-06512: at "SYS.XMLPARSER", line 79
    ORA-06512: at "MyProcedure", line 219
    ORA-06512: at line 1
    Now, I've seen that sometimes this can be caused because of a missing dtd, so I've set the following:
    xmlparser.setValidationMode(parser, FALSE);
    Moreover, I can access the same file with a call to:
    utl_file.fopen(Path, File, 'r');
    What can I begin to do to try and solve this?
    Thanks,
    Ryan

    Oh - I think this is the problem:
    http://www.lc.leidenuniv.nl/awcourse/oracle/appdev.920/a96621/adx20ppl.htm#1005695
    Argument Description: 'dir'
    "should be specified as a complete path name" - I was using a directory alias

  • ORA-20100: Error occurred while parsing: Start of root element expected.

    I've been searching everywhere for a reason to the following error message: ORA-20100: Error occurred while parsing: Start of root element expected.
    I get this when attempting to parse an XML file stored as a CLOB using the xmlparser.parseClob procedure
    Any help would be much appreciated.

    I initially used US ASCII but then tried several unicode formats as created by XML Spy (UTF16, Unicode16, Unicode32). All had the exact same result.
    Exactly what would be the most helpful output? The XML documents are varied, mostly very simple, but do you want the CLOB printed some other way?
    --Joan Armstrong
    null

  • Error occurred while parsing: Start of root element expected.

    This my code i use to try inserting xml data:
    v_BFile := BFILENAME('XML_DIR',v_xmlfile);
    DBMS_LOB.createTemporary(v_clob, cache=>false);
    DBMS_LOB.open(v_bFile, DBMS_LOB.lob_readonly);
    DBMS_LOB.loadFromFile(v_clob,v_BFile,DBMS_LOB.getLength(v_bfile));
    DBMS_LOB.close(v_bfile);
    v_parser := XMLPARSER.newParser;
    XMLPARSER.parseClob(v_parser,v_clob);
    On the parseClob is get the error message: Error occurred while parsing: Start of root element expected.
    My xml is as follows
    <?xml version="1.0" ?>
    <EMPLOYEES>
    <EMP>
    <EMPNO>8000</EMPNO>
    <ENAME>JONES</ENAME>
    <JOB>DBA</JOB>
    <MGR>7839</MGR>
    <HIREDATE>07-MAY-2002</HIREDATE>
    <SAL>100</SAL>
    <COMM>10</COMM>
    <DEPTNO>10</DEPTNO>
    </EMP>
    <EMP>
    <EMPNO>8001</EMPNO>
    <ENAME>SMITH</ENAME>
    <JOB>PROG</JOB>
    <MGR />
    <HIREDATE>01-MAY-2002</HIREDATE>
    <SAL>200</SAL>
    <COMM>10</COMM>
    <DEPTNO>10</DEPTNO>
    </EMP>
    </EMPLOYEES>
    What do i do wrong. Can someone help me

    Kurt
    Can you answer the following questions
    Which Release of the database are you using ?
    What is the database character set ?
    What is the character set encoding of the source document ?
    Remember that the loadFromFile procedure is designed to load binary data, and does not convert data into the database character set. If the database character set is UTF8, then the CLOB data has to be UCS2.
    Can you dump the contents of the CLOB
    If you are using 9iR2 then you can use the new procedure GetCLOBFromFile which will perform the correct coversions.
    Also in 9iR2 we would recommend the use of the DBMS_XMLPARSER package, rather than the XMLPARSER package. The reason for this is the DBMS_XMLPARSER makes use of a 'C' based parser, running as native compiled code, which XMLPARSER still uses the Java based version of the parser. Performance with DBMS_XMLPARSER is much better.
    Hope this helps

  • Error while parsing CLOB

    I got following error while parsing clob :
    ORA-20100: Error occurred while parsing: ORA-00942: table or view does not exist
    ORA-06512: at "SYSTEM.XMLPARSER", line 22
    ORA-06512: at "SYSTEM.XMLPARSER", line 98
    Any Ideas ? What Table or View it is looking for ?

    Code :
    DECLARE
    doctoparse clob;
    p Xmlparser.Parser;
    doc Xmldom.DOMDocument;
    nl Xmldom.DOMNodeList;
    len NUMBER;
    len2 NUMBER;
    n Xmldom.DOMNode;
    m Xmldom.DOMNode;
    e Xmldom.DOMElement;
    nnm Xmldom.domNamedNodeMap;
    attrname VARCHAR2(100);
    attrval VARCHAR2(100);
    BEGIN
    SELECT detaildata
    INTO doctoparse
    FROM USERDATA
    WHERE userid = 50650;
    p := Xmlparser.newParser;
    Xmlparser.setValidationMode(p, FALSE);
    Xmlparser.parseclob(p, doctoparse);
    doc := Xmlparser.getDocument(p);
    Xmlparser.freeParser (p);
    nl := Xmldom.getElementsByTagName(doc, '*');
    len := Xmldom.getLength(nl);
    dbms_output.put_line('LENGTH OF DOM = ' &#0124; &#0124; TO_CHAR(len));
    FOR i IN 0..len-1 LOOP
    n := Xmldom.item(nl, i);
    e := Xmldom.makeElement(n);
    dbms_output.put_line(Xmldom.getTagName(e) &#0124; &#0124; ':' );
    m := Xmldom.getFirstChild(n);
    dbms_output.put(Xmldom.getNodeValue(m));
    m := xmldom.getparentnode(n);
    e := xmldom.makeelement(m);
    dbms_output.put_line('Parent = ' &#0124; &#0124; Xmldom.getTagName(e) &#0124; &#0124; CHR(13)) ;
    nnm := Xmldom.getAttributes(n);
    len2 := Xmldom.getlength(nnm);
    FOR j IN 0 ..len2 - 1 LOOP
    m := Xmldom.item(nnm, j);
    attrname := Xmldom.getNodeName(m);
    attrval := Xmldom.getNodeValue(m);
    dbms_output.put(' ' &#0124; &#0124; attrname &#0124; &#0124; ' = ' &#0124; &#0124; attrval);
    END LOOP;
    dbms_output.put_line('');
    END LOOP;
    xmldom.freedocument(doc);
    END;
    Data in CLOB :
    <Data><Country>nklmdnl</Country><Fax>6788267882</Fax><City>sdfsdf</City><WorkPhone>6788267882</WorkPhone><State>nn</S tate><Zip>12343</Zip></Data>
    Thanks,

  • XML DOM Error in 8i. Please see.

    Hi,
    I am executing a SQL Script which has the xmldom.importNode()function.
    It compiles fully in 9I but when I run this on 8I,
    I get the error:
    Errors for FUNCTION MERGE_XML:
    LINE/COL ERROR
    28/12    PL/SQL: Statement ignored
    28/25    PLS-00302: component 'IMPORTNODE' must be declaredDoes 8I has a problem whilst executing the script?
    Do I need to install a patch in 8I?
    Can some one please help me?
    THE SQL script is as follows:
    CREATE OR REPLACE FUNCTION merge_xml(xmlTheirs IN OUT CLOB,
                                         xmlOurs   IN OUT CLOB
    RETURN clob
    AS
    dom1  xmldom.DOMDocument;
    dom2  xmldom.DOMDocument;
    p     xmlparser.Parser;
    n     xmldom.DOMNode;
    nn    xmldom.DOMNode;
    t_lob CLOB;
    BEGIN
           p := xmlparser.newParser;
           xmlparser.parseClob(p   => p,
                               doc => xmlTheirs);
           dom1 := xmlparser.getDocument(p => p);
           xmlparser.parseClob(p   => p,
                               doc => xmlOurs);
           dom2 := xmlparser.getDocument(p => p);
           xmlparser.freeParser(p => p);
           n := xmldom.getFirstChild(n => xmldom.makeNode(xmldom.getDocumentElement(doc => dom2)));
           WHILE (NOT xmldom.isNull(n))
           LOOP
               nn := xmldom.importNode(n       => dom1,
                                       srcNode => n,
                                       deep    => TRUE);
               nn := xmldom.appendChild(xmldom.makeNode(xmldom.getDocumentElement(doc => dom1)),
                                        nn);
               n  := xmldom.getNextSibling(n => n);
           END LOOP;
           dbms_lob.createtemporary(lob_loc => t_lob,
                                    cache   => TRUE);
           xmldom.writeToClob(dom1,
                              t_lob);
           xmldom.freeDocument(doc => dom1);
           xmldom.freeDocument(doc => dom2);
           xmldom.freeDocument(doc => dom2);
           RETURN(t_lob);
    END;

    iamabeefcake wrote:
    So I had to restore my computer to factory settings. Before I did that I read that I can save my thousands of itunes song ratings by creating a smart playlist for each rating and exporting them to xml.
    No need to export anything.
    Song ratings (and all other data) is saved in the iTunes library.itl file in the iTunes folder. Some of the data is also saved in the iTune slibrary.xml file.
    Did you by chance simply save the entire /Music/iTunes/ folder?
    If so, quit iTunes, copy it back to /Music/ then open iTunes.
    Your iTunes library will be exactly as it was before you erased & reinstalled.

  • SetValidation for PL/SQL XmlParser

    I am parsing a document which contains a DOCTYPE reference to a DTD file I do not have.
    I want to parse the document without validation.
    However when I make the calls:
    xmlparser.setValidationMode(parser, FALSE);
    xmlparser.parseCLOB(parser,xml);
    I receive and error that the DTD cannot be found.
    Why, if I am not trying to validate is the parser trying to retrieve the DTD.
    Thanks for any pointers.
    Rick Laird
    iBASEt
    FUNCTION parse(xml CLOB, baseDir VARCHAR2 :=NULL, Validate BOOLEAN := False) RETURN xmldom.DOMDocument IS
    retDoc xmldom.DOMDocument;
    parser xmlparser.Parser;
    BEGIN
    IF xml IS NULL THEN RETURN retdoc;
    END IF;
    setProxy;
    parser := xmlparser.newParser;
    IF Not(baseDir is NULL) THEN
    xmlparser.setbasedir(parser, basedir);
    end if;
    xmlparser.setValidationMode(parser, Validate);
    xmlparser.parseCLOB(parser,xml);
    retDoc := xmlparser.getDocument(parser);
    xmlparser.freeParser(parser);
    RETURN retDoc;
    EXCEPTION
    WHEN parse_error THEN
    xmlparser.freeParser(parser);
    Raise;
    RETURN retdoc;
    END;

    I found the posting from Steven Muench which might help.
    Patti
    Title : re:DOMParser opens dtd file even when validation mode is NONVALIDATING?
    Author : Steven Muench Type : Question
    Date : Nov 18, 2001 13:23 PT
    An XML Parser must open the DTD even in non-validating mode
    because the DTD might have default attribute values defined.
    For example, if your DTD has an element named <doit> and this
    <doit> element supports an attribute named "mode" that can have
    values "immediate" and "deferred", you can specify in the DTD
    that the "mode" attribute should default to "immediate".
    So, if you try to parse an XML document like:
    <?xml version="1.0"?>
    <!DOCTYPE commandlist SYSTEM "your.dtd">
    <commandlist>
    <doit command="zipit"/> <!-- no 'mode' specified -->
    </commandlist>
    When you process the document in your program, you will see
    a "mode" attribute with the default value of "immediate" (even
    though it was not specified in the file).
    If you do NOT have any default attributes, then you can put
    the standalone="yes" in your XML declaration like this:
    <?xml version="1.0" standalone="yes"?>
    and this gives the parser the hint not to read the DTD.
    I am parsing a document which contains a DOCTYPE reference to a DTD file I do not have.
    I want to parse the document without validation.
    However when I make the calls:
    xmlparser.setValidationMode(parser, FALSE);
    xmlparser.parseCLOB(parser,xml);
    I receive and error that the DTD cannot be found.
    Why, if I am not trying to validate is the parser trying to retrieve the DTD.
    Thanks for any pointers.
    Rick Laird
    iBASEt
    FUNCTION parse(xml CLOB, baseDir VARCHAR2 :=NULL, Validate BOOLEAN := False) RETURN xmldom.DOMDocument IS
    retDoc xmldom.DOMDocument;
    parser xmlparser.Parser;
    BEGIN
    IF xml IS NULL THEN RETURN retdoc;
    END IF;
    setProxy;
    parser := xmlparser.newParser;
    IF Not(baseDir is NULL) THEN
    xmlparser.setbasedir(parser, basedir);
    end if;
    xmlparser.setValidationMode(parser, Validate);
    xmlparser.parseCLOB(parser,xml);
    retDoc := xmlparser.getDocument(parser);
    xmlparser.freeParser(parser);
    RETURN retDoc;
    EXCEPTION
    WHEN parse_error THEN
    xmlparser.freeParser(parser);
    Raise;
    RETURN retdoc;
    END;

  • PLS-00201 ERROR - XML. and XPATH. Calls

    I'm getting the below errors. I've loaded javavm and inixml.
    Does anyone have any suggestion on compiling the vendor code.
    Thanks. Corey
    SQL> show errors
    Errors for PACKAGE BODY INTR_ITIN_PKG:
    LINE/COL ERROR
    334/3 PL/SQL: Statement ignored
    334/13 PLS-00201: identifier 'XML.PARSE' must be declared
    341/3 PL/SQL: Statement ignored
    341/21 PLS-00201: identifier 'XPATH.SELECTNODES' must be declared
    353/5 PL/SQL: Statement ignored
    353/22 PLS-00201: identifier 'XPATH.SELECTNODES' must be declared
    363/5 PL/SQL: Statement ignored
    363/21 PLS-00201: identifier 'XPATH.SELECTNODES' must be declared
    480/3 PLS-00201: identifier 'XML.FREEDOCUMENT' must be declared
    480/3 PL/SQL: Statement ignored
    498/11 PL/SQL: Statement ignored
    LINE/COL ERROR
    498/29 PLS-00201: identifier 'XPATH.SELECTNODES' must be declared
    509/11 PLS-00201: identifier 'XML.FREEDOCUMENT' must be declared
    509/11 PL/SQL: Statement ignored
    685/3 PL/SQL: Statement ignored
    685/17 PLS-00201: identifier 'XPATH.SELECTNODES' must be declared
    707/3 PL/SQL: Statement ignored
    707/17 PLS-00201: identifier 'XPATH.SELECTNODES' must be declared
    753/3 PL/SQL: Statement ignored
    753/17 PLS-00201: identifier 'XPATH.SELECTNODES' must be declared
    SQL>

    I had a package which worked under 8i, part of the package body like
    Create or Replace Package Body AbleTool as
    Function Transform(xml Clob,xsl Clob) Return Clob is
    p xmlparser.Parser;
    xmldoc xmldom.DOMDocument;
    xsldoc xmldom.DOMDocument;
    proc xslprocessor.Processor;
    ss xslprocessor.Stylesheet;
    cl Clob;
    begin
    p := xmlparser.newParser;
    xmlparser.setValidationMode(p, FALSE);
    xmlparser.setPreserveWhiteSpace(p, TRUE);
    xmlparser.parseClob(p, xml); -- parse xml
    xmldoc := xmlparser.getDocument(p);
    xmlparser.parseClob(p, xsl); -- parse xsl
    xsldoc := xmlparser.getDocument(p);
    proc := xslprocessor.newProcessor;
    ss := xslprocessor.newStylesheet(xsldoc, '');
    dbms_lob.createtemporary(cl, TRUE);
    xslprocessor.processXSL(proc, ss, xmldoc,cl);
    xslprocessor.freeStyleSheet(ss);
    xslprocessor.freeProcessor(proc);
    return cl;
    when I installed 9i db, and run the package on it. I get errors
    like
    PLS-00201: identifier 'XMLPARSER' must be declared
    PL/SQL: Item ignored
    PLS-00201: identifier 'XMLDOM' must be declared
    PL/SQL: Item ignored
    PLS-00201: identifier 'XMLDOM' must be declared
    PL/SQL: Item ignored
    PLS-00201: identifier 'XSLPROCESSOR.PROCESSOR' must be declared
    PL/SQL: Item ignored
    PLS-00201: identifier 'XSLPROCESSOR.STYLESHEET' must be declared
    PL/SQL: Item ignored
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    PL/SQL: Statement ignored
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    PL/SQL: Statement ignored
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    PL/SQL: Statement ignored
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    PL/SQL: Statement ignored
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    PL/SQL: Statement ignored
    I searched on the Forum, someone suggests that the following privileges should grant to the user.
    execute of xmldom
    execute of xmlparser
    execute of xslprocessor
    so I did as he said, the first two errors about xmldoc and xmlparser gone, the third error is still there, the error message is
    PLS-00201: identifier 'XSLPROCESSOR.PROCESSOR' must be declared
    PL/SQL: Item ignored
    PLS-00201: identifier 'XSLPROCESSOR.STYLESHEET' must be declared
    PL/SQL: Item ignored
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    PL/SQL: Statement ignored
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    PL/SQL: Statement ignored
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    PL/SQL: Statement ignored
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    PL/SQL: Statement ignored
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    PL/SQL: Statement ignored
    What else there I should do?
    Please help.

  • ORA-20100: Error occurred while parsing:Error opening external DTD ( Asap)

    Hi I'm using domsample example. And I have written the program. The xml file at the starting has this string"<!DOCTYPE MobileInventoryResponse SYSTEM "MobileInventoryResponse.dtd">", from which I'm getting error -"ORA-20100: Error occurred while parsing: Error opening external DTD".
    I'm new to xml could you please help me to solve this problem. I assume this is related to DTD for which I need to set base path. But I'm not sure how to do it? I'm getting this xml file through CLOB which I'm able to parse until an extent. where in between got this error.
    Here is my partial code:
    l_doc_id := rec_xml_data.id;
    l_xml_parser := xmlparser.newParser;
    xmlparser.setValidationMode(l_xml_parser, FALSE);
    xmlparser.parseCLOB(l_xml_parser,rec_xml_data.l_xml_data);--PARSING THE CLOB WHICH CONTAINS XML FILE
    l_xml_doc := xmlparser.getDocument(l_xml_parser);
    xmlparser.freeParser(l_xml_parser);
    l_nodelist := xmldom.getElementsByTagName(l_xml_doc, '*');
    l_length := xmldom.getLength(l_nodelist);
    -- loop through elements
    FOR l_rec_xml in 0..l_length-1
    LOOP
    l_node := xmldom.item(l_nodelist, l_rec_xml);
    -- dbms_output.put(xmldom.getNodeName(n) || ' ');
    -- get the text node associated with the element node
    l_nodename:=xmldom.getNodeName(l_node);
    l_node := xmldom.getFirstChild(l_node);
    IF (xmldom.isNull(l_node) = false) THEN
    IF xmldom.getNodeType(l_node) = xmldom.TEXT_NODE THEN
    IF l_nodename = 'purchase-order-number' THEN
    l_po_num:=NULL;
    l_po_num:= xmldom.getNodeValue(l_node);
    -- dbms_output.put_line('Purchaser Order Num : '||l_po_num);
    END IF;
    from here onwards I get the string values
    Now I don't know where to set the DTD basepath or baseurl. I need it asap.
    Regards,
    Naveen.

    The version which I'm working on is 10.2.0.4.
    XML File---
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE MobileInventoryResponse SYSTEM "MobileInventoryResponse.dtd">
    <MobileInventoryResponse>
    <message>
    <message-header>
    <message-id>16244182</message-id>
    <transaction-name>ship-advice</transaction-name>
    <partner-name>cbeyond</partner-name>
    <source-url>http://www.brightpoint.com</source-url>
    <create-timestamp>20080826150709</create-timestamp>
    <response-request>1</response-request>
    </message-header>
    <ship-advice>
    <header>
    <customer-id>297859</customer-id>
    <shipment-information>
    <ship-first-name>RA_13Aug_1</ship-first-name>
    <ship-last-name>MIND</ship-last-name>
    <ship-address1>test</ship-address1>
    <ship-city>test</ship-city>
    <ship-state>VA</ship-state>
    <ship-post-code>22102-4931</ship-post-code>
    <ship-country-code>US</ship-country-code>
    <ship-phone1>0040726335068</ship-phone1>
    <ship-email>[email protected]</ship-email>
    <ship-via>FX01</ship-via>
    <ship-request-date>20080826</ship-request-date>
    <ship-request-warehouse>CBY1</ship-request-warehouse>
    </shipment-information>
    <purchase-order-information>
    <purchase-order-number>380928</purchase-order-number>
    <account-description />
    <purchase-order-amount>0.0</purchase-order-amount>
    <currency-code>USD</currency-code>
    </purchase-order-information>
    <order-header>
    <customer-order-number>0002759</customer-order-number>
    <customer-order-date>20080826</customer-order-date>
    <order-sub-total>19.0</order-sub-total>
    <order-discount>0.0</order-discount>
    <order-tax1>0.0</order-tax1>
    <order-tax2>0.0</order-tax2>
    <order-tax3>0.0</order-tax3>
    <order-shipment-charge>18.0</order-shipment-charge>
    <order-total-net>0.0</order-total-net>
    <order-status>Completed</order-status>
    <order-type />
    <brightpoint-order-number>35028788</brightpoint-order-number>
    <warehouse-id>CBY1</warehouse-id>
    <ship-date>20080826</ship-date>
    </order-header>
    </header>
    <detail>
    <line-item>
    <line-no>1</line-no>
    <item-code>SKU1</item-code>
    <universal-product-code>0</universal-product-code>
    <ship-quantity>1.0</ship-quantity>
    <unit-of-measure>EA</unit-of-measure>
    <serial-list>
    <serial-numbers>
    <esn>TIMI000013</esn>
    </serial-numbers>
    </serial-list>
    <line-status />
    <base-price>0.0</base-price>
    <line-discount>0.0</line-discount>
    <line-tax1>0.0</line-tax1>
    <line-tax2>0.0</line-tax2>
    <line-tax3>0.0</line-tax3>
    <bill-of-lading>929406733828</bill-of-lading>
    <scac>FX01</scac>
    </line-item>
    </detail>
    </ship-advice>
    <transactionInfo>
    <eventID>16244182</eventID>
    </transactionInfo>
    </message>
    </MobileInventoryResponse>
    XML FILE END--------------------
    MY PROGRAM IS AS BELOW---
    get_eai_data_prc( x_ret_code OUT NUMBER
    ,p_debug_flag IN VARCHAR2
    IS
    --Local Variables
    l_xml_parser xmlparser.Parser;
    l_xml_doc xmldom.DOMDocument;
    l_xml_data CLOB;
    l_nodelist xmldom.DOMNodeList;
    l_length NUMBER := 0;
    l_num_cnt NUMBER := 0;
    l_node xmldom.DOMNode;
    l_docelem DBMS_XMLDOM.DOMElement; -- XML DOM element.
    l_nodeValue VARCHAR2(30); -- Text value of the node.
    l_nodename VARCHAR2(100);
    l_po_num VARCHAR2(150);
    l_account_desc VARCHAR2(150);
    l_cust_ord VARCHAR2(150);
    l_ship_date VARCHAR2(150);
    l_item_code VARCHAR2(150);
    l_ship_qty VARCHAR2(150);
    l_esn VARCHAR2(150);
    l_cust_channel_type VARCHAR2(150);
    l_cust_grp_acct VARCHAR2(150);
    l_max_doc_id NUMBER;
    l_doc_id NUMBER;
    l_market_id VARCHAR2(150);
    l_record_id VARCHAR2(30);
    TYPE l_esn_table IS TABLE OF VARCHAR2(30)
    INDEX BY BINARY_INTEGER;
    l_data l_esn_table;
    --CURSOR TO GET XML DATA FROM EAI
    CURSOR cur_xml_data(p_doc_id VARCHAR2)
    IS
    SELECT id
         ,document l_xml_data
    FROM tds_xml_store_temp
    WHERE id >= id ;
    BEGIN
    FOR rec_xml_data IN cur_xml_data(l_max_doc_id)
    LOOP
    l_doc_id := rec_xml_data.id;
    l_xml_parser := xmlparser.newParser;
    xmlparser.setValidationMode(l_xml_parser, FALSE);
    xmlparser.parseCLOB(l_xml_parser,rec_xml_data.l_xml_data);
    l_xml_doc := xmlparser.getDocument(l_xml_parser);
    xmlparser.freeParser(l_xml_parser);
    l_nodelist := xmldom.getElementsByTagName(l_xml_doc, '*');
    l_length := xmldom.getLength(l_nodelist);
    -- loop through elements
    FOR l_rec_xml in 0..l_length-1
    LOOP
    l_node := xmldom.item(l_nodelist, l_rec_xml);
    -- dbms_output.put(xmldom.getNodeName(n));
    -- get the text node associated with the element node
    l_nodename:=xmldom.getNodeName(l_node);
    l_node := xmldom.getFirstChild(l_node);
    IF (xmldom.isNull(l_node) = false) THEN
    IF xmldom.getNodeType(l_node) = xmldom.TEXT_NODE THEN
    IF l_nodename = 'purchase-order-number' THEN
    l_po_num:=NULL;
    l_po_num:= xmldom.getNodeValue(l_node);
    -- dbms_output.put_line('Purchaser Order Num : '||l_po_num);
    END IF;--purchase-order-number
    IF l_nodename = 'account-description' THEN
    l_account_desc :=NULL;
    l_account_desc := xmldom.getNodeValue(l_node);
    END IF;
    IF l_nodename = 'customer-channel-type' THEN
    l_cust_channel_type:=NULL;
    l_cust_channel_type:= xmldom.getNodeValue(l_node);
    END IF;
    IF l_nodename = 'customer-group-account' THEN
    l_cust_grp_acct := NULL;
    l_cust_grp_acct := xmldom.getNodeValue(l_node);
    END IF;
    IF l_nodename = 'customer-order-number' THEN
    l_cust_ord:=NULL;
    l_cust_ord:= xmldom.getNodeValue(l_node);
    -- dbms_output.put_line('Customer Order NUm : '||l_cust_ord);
    END IF;--customer-order-number
    IF l_nodename = 'ship-date' THEN
    l_ship_date:=NULL;
    l_ship_date:= xmldom.getNodeValue(l_node);
    -- dbms_output.put_line('Ship Date : '||to_date(l_ship_date,'YYYY-mm-dd'));
    END IF;--ship-date
    IF l_nodename = 'item-code' THEN
    l_item_code:=NULL;
    l_item_code:= xmldom.getNodeValue(l_node);
    -- dbms_output.put_line('Item Code : '||l_item_code);
    END IF;--item-code
    IF l_nodename = 'esn' THEN
    l_esn:=NULL;
    l_num_cnt := l_num_cnt + 1;
    l_esn:=xmldom.getNodeValue(l_node);
    l_data(l_num_cnt) := l_esn;
    -- dbms_output.put_line('Serial Num : '||l_esn);
    END IF;--esn
    IF l_nodename = 'market-id' THEN
    l_market_id := NULL;
    l_market_id := xmldom.getNodeValue(l_node);
    END IF;
    IF l_nodename = 'ship-quantity' THEN
    l_ship_qty:=NULL;
    l_ship_qty:= xmldom.getNodeValue(l_node);
    -- dbms_output.put_line('Ship Quantity : '||l_ship_qty);
    END IF;--ship-quantity
    END IF;--xmldom.TEXT_NODE
    END IF;
    END LOOP;--l_rec_xml
    FOR j in l_data.first..l_data.last
    LOOP
    INSERT INTO cbey_shipment_int_stg( purchase_order_number
    ,account_description
    ,customer_order_number
    ,ship_date
    ,item_code
    ,ship_quantity
    ,esn
    ,customer_channel_type
    ,customer_group_account
    ,market_id
    ,eai_xml_doc_id
    ,record_status
    ,record_id
    VALUES
    ( l_po_num
    ,l_account_desc
    ,l_cust_ord
    ,to_date(l_ship_date,'YYYY-mm-dd')
    ,l_item_code
    ,l_ship_qty
    ,l_data(j)
    ,l_cust_channel_type
    ,l_cust_grp_acct
    ,l_market_id
    ,l_max_doc_id
    ,'NEW'
    ,CBEY_RECORD_ID_SEQ_S.nextval
    END LOOP;--j
    UPDATE cbey_interface_run_log
    SET request_id = l_conc_req_id
    ,lastrun_date = SYSDATE
    ,doc_id = rec_xml_data.id
    WHERE program_id = 'SHIPMENT_INT'
    AND doc_id =l_max_doc_id;
    l_data.delete;
    l_num_cnt :=0;
    END LOOP; --rec_xml_data
    COMMIT;
    END of the Procedure--------------------------
    Now if I load the xml file without the this :- <!DOCTYPE MobileInventoryResponse SYSTEM "MobileInventoryResponse.dtd">
    it works well. But it gives error when this particular thing is there.
    Regards,
    Naveen
    Edited by: MAN on Oct 17, 2008 7:28 AM

  • HELP: DEADLINE!!!! ERROR PLS-00306: WITH APPENDCHILD

    I am new to this... any help is greatly appreciated..
    set serveroutput on
    CREATE OR REPLACE FUNCTION uf_buildWRDetail(pi_lWRNum IN NUMBER) RETURN VARCHAR2 IS
    xmlDoc xmlDom.DOMDocument;
    xmlDocOriginal xmlDom.DOMDocument;
    xmlDocAddOn xmlDom.DOMDocument;
    parserWRDetail xmlparser.Parser;
    parserWRAssoc xmlparser.Parser;
    parserTemp xmlparser.Parser;
    xmlDocElementO xmlDom.DOMElement;
    xmlDocElementA xmlDom.DOMElement;
    el xmlDom.DOMElement;
    xmlDOMList xmlDOM.DOMNodeList;
    xmlDOMNodeO xmlDOM.DOMNode;
    xmlDOMNodeA xmlDOM.DOMNode;
    xmlNodeVal xmlDOM.DOMNode;
    xmlNodeName xmlDOM.DOMNode;
    docNodeROOT xmlDOM.DOMNode;
    docNodeROWSET xmlDOM.DOMNode;
    docNodeROW xmlDOM.DOMNode;
    docNodeFIELD xmlDOM.DOMNode;
    docNodeTEXT xmlDOM.DOMNode;
    nodeAssocParty xmlDOM.DOMNode;
    nodeAPROW xmlDOM.DOMNode;
    xmlElement xmlDOM.DOMElement;
    cWRDetail CLOB;
    cWRAssoc CLOB;
    sNodeName VARCHAR2(2000);
    sNodeValue VARCHAR2(2000);
    nodeCount NUMBER;
    sTempOut VARCHAR2(32767);
    temp2 varchar2(255);
    BEGIN
    --=======================================================================
    -- MASTER OUT
    --=======================================================================
    parserTemp := xmlparser.newParser;
    xmlparser.parseBuffer(parserTemp,'<ROWSET/>');
    xmlDoc := xmlparser.getDocument(parserTemp);
    xmldom.setVersion(xmlDoc, '1.0');
    docNodeROOT := xmldom.makeNode(xmlDoc);
    docNodeROWSET := xmldom.getLastChild(docNodeROOT);
    el := xmldom.createElement(xmlDoc, 'ROW');
    docNodeROW := xmldom.appendChild(docNodeROWSET, xmldom.makeNode(el));
    --=======================================================================
    -- WORK DETAIL
    --=======================================================================
    -- this function returns a clob with the standard ROWSET/ROW namings
    --==============================================================================
    select uf_getWRDetail(pi_lWRNum) into cWRDetail from dual;
    --=============================================================================
    parserWRDetail := xmlparser.newParser;
    xmlparser.ParseCLOB(parserWRDetail, cWRDetail);
    xmlDocOriginal := xmlparser.getDocument(parserWRDetail);
    xmlDOMList := xmldom.getElementsByTagName(xmlDocOriginal, '*');
    nodeCount := xmldom.getLength(xmlDOMList);
    if nodeCount > 0 then
    for i in 2..nodeCount-1 loop
    xmlDOMNodeO := xmldom.item(xmlDOMList, i);
    sNodeName := xmldom.getNodeName(xmlDOMNodeO);
    xmlDOMNodeO := xmldom.getFirstChild(xmlDOMNodeO);
    sNodeValue := xmldom.getNodeValue(xmlDOMNodeO);
    docNodeFIELD := xmldom.makeNode(xmldom.createElement(xmlDoc, sNodeName));
    docNodeTEXT := xmldom.makeNode(xmldom.createTextNode(xmlDoc, NVL(sNodeValue,' ')));
    xmlNodeVal := xmldom.appendChild(docNodeROW, docNodeFIELD);
    xmlNodeVal := xmldom.appendChild(docNodeFIELD, sNodeValue);
    end loop;
    end if;
    --=======================================================================
    -- WORK DETAIL END
    --=======================================================================
    -- TEMPORARILTY REMOVED...
    --=======================================================================
    -- ASSOCIATED PARTIES
    --=======================================================================
    -- select uf_getWRAssocParties(pi_lWRNum) into cWRAssoc from dual;
    -- parserWRAssoc := xmlparser.newParser;
    -- xmlparser.ParseCLOB(parserWRAssoc, cWRAssoc);
    -- xmlDocAddOn := xmlparser.getDocument(parserWRAssoc);
    -- xmlDOMList := xmldom.getElementsByTagName(xmlDocAddOn, '*');
    -- nodeCount := xmldom.getLength(xmlDOMList);
    -- if nodeCount > 0 then
    -- el := xmldom.createElement(xmlDoc, 'ASSOCPARTIES');
    -- nodeAssocParty := xmldom.appendChild(docNodeROW, xmldom.makeNode(el));
    -- for i in 2..nodeCount-1 loop
    -- el := xmldom.createElement(xmlDoc, 'ASSOCPARTIESROW');
    -- nodeAPROW := xmldom.appendChild(nodeAssocParty, xmldom.makeNode(el));
    -- xmlDOMNodeO := xmldom.item(xmlDOMList, i);
    -- sNodeName := xmldom.getNodeName(xmlDOMNodeO);
    -- xmlDOMNodeO := xmldom.getFirstChild(xmlDOMNodeO);
    -- sNodeValue := xmldom.getNo deValue(xmlDOMNodeO);
    -- docNodeFIELD := xmldom.makeNode(xmldom.createElement(xmlDoc, sNodeName));
    -- docNodeTEXT := xmldom.makeNode(xmldom.createTextNode(xmlDoc, NVL(sNodeValue,' ')));
    -- xmlNodeVal := xmldom.appendChild(nodeAPROW, docNodeFIELD);
    -- xmlNodeVal := xmldom.appendChild(docNodeFIELD, sNodeValue);
    -- end loop;
    -- end if;
    --=======================================================================
    -- ASSOCIATED PARTIES END
    --=======================================================================
    xmldom.writeToBuffer(xmlDoc, sTempOut);
    RETURN sTempOut;
    END;
    /

    Hello!
    Please check Type and Number of Parameters of the called Procedure/Function
    This is a common PL/SQL-Error, not an XML-specific one.
    Bye and be blessed

  • Limits to parseCLOB ????

    !!! LIMITS TO PARSECLOB ??? !!!
    This message is ment for the oracle team.
    When using pl/sql i tried to parse (with xmlparser.parseCLOB) a xml that had the same structure as this example:
    <?xml version="1.0"?>
    <TestThis>
    <header>
    <time>12:23:22</time>
    </header>
    <body>
    <product>
    <name>prod1</name>
    </product>
    <product>
    <name>prod2</name>
    </product>
    <product>
    <name>prod3</name>
    </product>
    </body>
    </TestThis>
    I don't really have a question, but want a verification. Is it true that parseCLOB can't handle multiple tags with the SAME NAME and SAME PARENT ?? Is this a known limitation to parseCLOB or a bug?
    I need this information really bad. Whether I'm searching in the wrong direction or have stumbled upon a limitation, I must know if i'm wrong here or just discovered a bug before i can continue...
    thanks...

    The question can be ignored...
    there is no limitation to parseCLOB concerning multiple tags with the same name...
    i made an error that was pretty hard to trace...
    so don't bother replying...
    sorry
    bye

  • ERROR: selectsinglenode to be declared

    DECLARE
    att_data_parser xmlparser.parser;
    att_data_domdoc xmldom.DOMDocument;
    l_xmlNode xmldom.DOMNode;
    l_strValue xmldom.DOMNode;
    cursor sp_oid_value is select distinct PDT_OID from PQ_supplypoint_test;
    cursor SP_CURSOR is select pd_document, pd_document_attribute from pq_supplypoint_test for update;
    BEGIN
    open sp_oid_value;
    fetch sp_oid_value into sp_oid_result;
    att_path :='select attribute_path, attribute_name from PQ_DOCUMENT_attribute_config where PDT_OID =:1';
         for sp_data in sp_cursor
         loop
    OPEN each_att_path FOR att_path USING sp_oid_result;
    LOOP
    FETCH each_att_path INTO att_result;
    EXIT WHEN each_att_path%NOTFOUND;
    dbms_output.put_line(att_result);
    while each_att_path%found
    loop
    att_data_parser := xmlparser.newParser;
    xmlparser.parseCLOB(att_data_parser,sp_data.pd_document);
    Att_data_domdoc := xmlparser.getDocument(att_data_parser);
    *****************THIS IS WHERE I HAVE THE PROBLEM
         l_xmlNode := xmldom.selectSingleNode(Att_data_domdoc,each_att_path.attribute_path);
         l_strValue := xmldom.getNodeValue(l_xmlNode);
    --dbms_output.put_line(l_strValue);
    xmlparser.freeParser(att_data_parser);
    end loop;
    END LOOP;
    end loop ; -- sp_cursor
    CLOSE each_att_path;
    CLOSE sp_oid_value;
    END;
    ****************The error on running this code is selectsinglenode to be declared.......
    MY question to you is:
    1)Am I using wrong syntax for selectsinglenode?
    2)how can I resolve this error?
    Many thanks in advance,
    Kind regards,
    Rekha

    Hi
    You mean to say that the table you have queried doesnt have a column called last_update_login right ? If its the case then what you did for debugging the error. Pls share it since i was also struggling with *<<<< needs to be declared abstract; it does not define the method setLastUpdateLogin() ..>>>*
    error.
    Thanks.
    Praveen

  • Class Not found Error - XML Related

    Dear Friends
    I created following package. It compiled properly. When i execute the package i am getting 'Class Oracle/xml/parser/PLSQL/xmlparsercover does not exist.
    My Package is
    create or replace package body XML_RD is
    procedure XML_Test is
    v_parser sys.xmlparser.parser;
    g_clob clob;
    domDoc sys.xmldom.domdocument;
    nodlst sys.xmldom.domnodelist;
    nmdnodmap sys.xmldom.DomNamedNodeMap;
    nod sys.xmldom.domnode;
    elemnt sys.xmldom.DomElement;
    v_doc sys.xmldom.domdocument;
    len number;
    l_string varchar2(200);
    Cursor cur_hld_area is
    select * from slcdatrecrdi
    where filseqnum=-1;
    begin
    dbms_lob.createtemporary(g_clob,TRUE);
    v_parser := sys.xmlparser.newParser;
    l_string := '<ROOT>'||chr(10);
    Dbms_lob.writeappend(g_clob,length(l_string),l_string);
    for i in cur_hld_area
    loop
    l_string := trim(i.awbrec)||chr(10);
    Dbms_lob.writeappend(g_clob,length(l_string),l_string);
    end loop;
    l_string := '</ROOT>';
    Dbms_lob.writeappend(g_clob,length(l_string),l_string);
    sys.xmlparser.parseclob(v_parser,g_clob);
    v_doc := sys.xmlparser.getDocument(v_parser);
    nodlst:=sys.xmldom.getelementsbytagname(v_doc,'*');
    Message(sys.xmldom.getlength(nodlst));
    -- v_nl_obj := sys.xslprocessor.selectNodes(sys.xmldom.makeNode(v_doc),'*');
    -- l_tabcnt := sys.xmldom.getlength(v_nl_obj);
    end XML_Test;
    end XML_RD;
    Plaese help
    Thanks & Regards
    S. Anwarul Yaseen

    Hi,
    Verify the 3rd party class files names are correctly written in your program. Sometimes wrong case might be the reason.
    bye for now
    sat

  • Error in XML compiling

    Hi,
    I am trying to complie my class directly on the server, which access an XMLParser class. When i am trying to do so. I am getting the following errors at the compile time:
    error: Can't write: ./XMLParser.class
    error: Can't write: ./XMLParser.class$XMLContentHandler.class
    error: Can't write: ./XMLParser.class$ParserErrorHandler.class
    error: Can't write: ./XMLParser.class$Storage.class
    error: Can't write: ./XMLParser.class$XMLField.class
    Any ideas..... thanks in advance

    Okay, that throws out that...
    have you tried to do it on any other computer? are you physically sitting next
    to the server? Or using remove desktop? Compiling using command prompt javac or some IDE like eclipse? Trying to narrow down your problem(s)...

Maybe you are looking for