Parse a CLOB

I am trying to parse a XML in a CLOB by using following lines of CODE
FUNCTION parse(xml CLOB) RETURN xmldom.DOMDocument IS
retDoc xmldom.DOMDocument;
parser xmlparser.Parser;
BEGIN
IF xml IS NULL THEN RETURN NULL; END IF;
setProxy;
parser := xmlparser.newParser;
xmlparser.parseCLOB(parser,xml);
retDoc := xmlparser.getDocument(parser);
xmlparser.freeParser(parser);
RETURN retDoc;
EXCEPTION
WHEN parse_error THEN
xmlparser.freeParser(parser);
RETURN retdoc;
END;
The retDoc does not contain the full XML that was sent in for parsing. The last couple of lines are getting truncated.
Has any one experienced a similar thing? And what is the solution?
Thanks.

You should have this problem. Which of XDK version do you use?

Similar Messages

  • PLSQL XML Parsing and CLOB's

    Question: Is this the proper way to parse an XML document that is contained within a clob?
    procedure publishXmlClob
    (p_xml_doc in clob
    ) is
    v_parser xmlparser.parser;
    v_doc xmldom.DOMDocument;
    v_node_list xmldom.DOMNodeList;
    v_list_len number := 0;
    v_node xmldom.DOMNode;
    v_xml_clob clob;
    begin
    dbms_lob.createTemporary(v_xml_clob, true, dbms_lob.session);
    dbms_lob.copy(v_xml_clob, p_xml_doc, dbms_lob.getLength(p_xml_doc));
    v_parser := xmlparser.newParser;
    xmlparser.setValidationMode(v_parser, FALSE);
    xmlparser.parseClob(v_parser, v_xml_doc);
    v_doc := xmlparser.getDocument(v_parser);
    end publishXmlClob;
    Thanks for any help.
    r

    Question: Is this the proper way to parse an XML document that is contained within a clob?
    procedure publishXmlClob
    (p_xml_doc in clob
    ) is
    v_parser xmlparser.parser;
    v_doc xmldom.DOMDocument;
    v_node_list xmldom.DOMNodeList;
    v_list_len number := 0;
    v_node xmldom.DOMNode;
    v_xml_clob clob;
    begin
    dbms_lob.createTemporary(v_xml_clob, true, dbms_lob.session);
    dbms_lob.copy(v_xml_clob, p_xml_doc, dbms_lob.getLength(p_xml_doc));
    v_parser := xmlparser.newParser;
    xmlparser.setValidationMode(v_parser, FALSE);
    xmlparser.parseClob(v_parser, v_xml_doc);
    v_doc := xmlparser.getDocument(v_parser);
    end publishXmlClob;
    Thanks for any help.
    r

  • Clob Parsing Error

    (Environment: Oracle 8.1.5.0.0 on Solaris)
    Problem: getting an error while parsing a Clob. "ORA-20100: Error occurred while parsing: Start of root element expected"
    Code:
    lv_contentDoc := Xml.PARSE(lv_myClob);
    where 1) lv_myClob contains the XML document. I've used dbms_lob.substr to verify the content of the CLOB. 2) "Xml" is the package from Steve Muench's book. 3) the content of the XML document was simplified to: <?xml version="1.0" standalone="yes"?><ClaimBatch></ClaimBatch>
    Can anybody help?
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by ss:
    Verify if your "clob table" has already grant (select....) to the shcema where xmlparser package is installed.
    thanks.<HR></BLOCKQUOTE>
    null

  • Parse CLOB response

    Hi!
    How can I could parse the response from the REST request (using XML or JSON)??? I can't find any API to parse the CLOB response.
    Thanks
    declare
    l_clob clob;
    l_buffer varchar2(32767);
    l_amount number;
    l_offset number;
    begin
    l_clob := apex_web_service.make_rest_request(
    p_url => 'http://ptmc0005:8080/Rest-Test-Web/patients.xml',
    p_http_method => 'GET',
    p_parm_name => apex_util.string_to_table('searchStr'),
    p_parm_value => apex_util.string_to_table('Bill'));
    l_amount := 32000;
    l_offset := 1;
    dbms_output.put_line(l_clob);
    end;

    What could be the problem or the solutions?1) Create an XMLType table (could be temporary) using binary XML storage :
    create table tmp_xml of xmltype
    xmltype store as securefile binary xml;2) In your procedure, load the XMLType containing the response (rsp_xml) into the table :
    insert into tmp_xml values (rsp_xml);3) Then, execute the query directly from the table :
    SELECT opciones_obj ( ... )
    BULK COLLECT INTO t_opciones
    FROM tmp_xml t
       , XMLTABLE (
             xmlnamespaces ( ... ),
             '/env:Envelope/env:Body/...'
             PASSING t.object_value
             COLUMNS ...4) At the end of the procedure, delete (or truncate) the table or simply let the table delete itself when the session ends (in case you created it TEMPORARY)

  • Trying to Insert an XML Element into XML data stored in CLOB column

    Hi all,
    My ORACLE DB version is:
    ('Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production');
    ('PL/SQL Release 11.2.0.2.0 - Production');
    ('CORE 11.2.0.2.0 Production');
    ('TNS for Linux: Version 11.2.0.2.0 - Production');
    ('NLSRTL Version 11.2.0.2.0 - Production');
    I have this XML data stored in a CLOB column:
    <Activity>
         <Changes>     
         </Changes>
         <Inserts>     
         </Inserts>
         <Definition>     
         </Definition>
         <Assignment TYPE="Apply">     
         </Assignment>
         <Spawned>
              <Activity>576D8CD9-57A1-8608-1563-8F6DC74BDF3C</Activity>
              <Activity>11226E79-5D24-02EB-A950-D34A9CCFB3FF</Activity>
              <Activity>DAA68DC0-CA9A-BB15-DE31-9596E19513EE</Activity>
              <Activity>93F667D6-966A-7EAD-9B70-630D9BEFDDD2</Activity>
              <Activity>FA63D9D3-86BB-3FF0-BE69-17EAA7581637</Activity>
         </Spawned>
         <SpawnedBy>AFC49BD4-5AA7-38C0-AE27-F59D16EE1B1C</SpawnedBy>
    </Activity>
    I am in need of some assistance in creating an update that will insert another <Activity>SomeGUID</Activity> into the <Spawned> parent.
    Any help is greatly appreciated.
    Thanks.
    Edited by: 943783 on Dec 14, 2012 12:58 PM

    See XML updating functions : http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb04cre.htm#i1032611
    For example :
    UPDATE my_table t
    SET t.my_clob =
          XMLSerialize(document
            insertChildXML(
              XMLParse(document t.my_clob)
            , '/Activity/Spawned'
            , 'Activity'
            , XMLElement("Activity", 'Some GUID')
    WHERE ...
    ;Although it works, there's overhead introduced by parsing the CLOB, then serializing again.
    Is there any chance you can change the CLOB to SECUREFILE binary XMLType storage instead?
    You would then be able to benefit from optimized piecewise update of the XML and improved storage.

  • How to parse an XMl without using prefix in the namespace and elements?

    Hi
    The following is a sample of the xml that I need to parse.
    Without the prefix in the namespace section I am getting an error but when i just put in the prefix it works fine. Any help here would be greatly appreciated.
    I think i need to change something in the parser set up...may be the somewhere in the bolded lines....but i am clueless...
    //Xml begins
    <?xml version="1.0" encoding="utf-8" ?>
    - <Statemessages xsi:schemaLocation="http://www.SomeLocation.com/SomeXSD.xsd" xmlns="http://www.abcd.com/BSN" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    - <FileControl>
    <CreationDate>2008-08-11</CreationDate>
    - <Source>
    <SystemID>SAP4BSN</SystemID>
    <MandantID>100</MandantID>
    </Source>
    - <Destination>
    <SystemID>CWL</SystemID>
    <MandantID>746</MandantID>
    </Destination>
    <SequenceNumber>000000004</SequenceNumber>
    <Counter>000000001</Counter>
    </FileControl>
    - <Message>
    - <PartyRegistrationID>
    <ID>2101576347</ID>
    <Type>RG</Type>
    <ID>2101576347</ID>
    <Type>AG</Type>
    </PartyRegistrationID>
    <CustomerGroupID>02</CustomerGroupID>
    <Name>Lewicki</Name>
    <Subname>Hans Bruno Michel</Subname>
    <DateTime>2008-08-11T23:59:59</DateTime>
    - <DefaultOfPayment>
    <MessageID>00000001</MessageID>
    <GrossAmountBefore>0.0</GrossAmountBefore>
    <GrossAmountCurrent>-17.9</GrossAmountCurrent>
    <Currency>EUR</Currency>
    <SettlementOfBalance>Nein</SettlementOfBalance>
    <IncludingSubsidiaryClaim>Ja</IncludingSubsidiaryClaim>
    </DefaultOfPayment>
    - <ContractsWithDefaultOfPayment>
    <ContractID>0148863732</ContractID>
    </ContractsWithDefaultOfPayment>
    - <Messagedetails>
    - <ReturnDebitNote>
    <MessageID>00000002</MessageID>
    <KindOf>BA</KindOf>
    <Reason>E2</Reason>
    <Date>2008-08-11</Date>
    <GrossAmount>-15.4</GrossAmount>
    <Currency>EUR</Currency>
    </ReturnDebitNote>
    </Messagedetails>
    </Message>
    </Statemessages>
    //XML end
    I am using the following stored procedure to try this;
    create or replace PROCEDURE CompleteSaveXML_1 AS
    XMLMessage2 XMLTYPE;
    v_parser dbms_xmlparser.Parser;
    v_clob CLOB;
    v_sent DATE;
    v_doc xmldom.DOMDocument;
    v_nl xmldom.DOMNodeList;
    v_nFCL xmldom.DOMNodeList;
    v_nFCN xmldom.DOMNode;
    v_nFCSourceL xmldom.DOMNodeList;
    v_nFCSourceN xmldom.DOMNode;
    v_nFCDestinationL xmldom.DOMNodeList;
    v_nFCDestinationN xmldom.DOMNode;
    m_nl xmldom.DOMNodeList;
    m_n xmldom.DOMNode;
    v_n xmldom.DOMNode;
    v_n3 xmldom.DOMNodeList;
    v_n4 xmldom.DOMNode;
    v_b xmldom.DOMNode;
    v_d xmldom.DOMNode;
    v_a xmldom.DOMNodeList;
    v_c xmldom.DOMNodeList;
    m_prg xmldom.DOMNodeList;
    m_pr xmldom.DOMNode;
    condf_nl xmldom.DOMNodeList;
    condf_n xmldom.DOMNode;
    msgdtl_nl xmldom.DOMNodeList;
    msgdtl_n xmldom.DOMNode;
    rtndbt_nl xmldom.DOMNodeList;
    rtndbt_n xmldom.DOMNode;
    dnlt_nl xmldom.DOMNodeList;
    dnlt_n xmldom.DOMNode;
    cancl_nl xmldom.DOMNodeList;
    cancl_n xmldom.DOMNode;
    conid_nl xmldom.DOMNodeList;
    conid_n xmldom.DOMNode;
    canclid_nl xmldom.DOMNodeList;
    canclid_n xmldom.DOMNode;
    par_ref number(10) :=0;
    msgnum number(20):=0;
    var1 number(30):=0;
    rtnnum number(20):=0;
    dnnum number(20):=0;
    tpmsg number(20):=0;
    condfpmt number(20):=0;
    canclnum number(20):=0;
    --Added the next variable
    sequence_no     number(20):=0;
    --These are the new variables
    condfpmt1 number(20):=0;
    rtnnum1 number(20):=0;
    dnnum1 number(20):=0;
    tpmsg1 number(20):=0;
    canclnum1 number(20):=0;
    --changing
    part_refid_value number(20);
    parid_typ_n xmldom.DOMNode;
    parid_typ_nl xmldom.DOMNodeList;
    parid_id_nl xmldom.DOMNodeList;
    parid_id_n     xmldom.DOMNode;
    party_ref_node xmldom.DOMNode;
    var_pr_reg_typ VARCHAR2(2);
    msgrtdbt_nl xmldom.DOMNodeList;
    msgrtdbt_n xmldom.DOMNode;
    kndrtdbt_nl xmldom.DOMNodeList;
    kndrtdbt_n xmldom.DOMNode;
    rsnrtdbt_nl xmldom.DOMNodeList;
    rsnrtdbt_n xmldom.DOMNode;
    datrtdbt_nl xmldom.DOMNodeList;
    datrtdbt_n xmldom.DOMNode;
    grssrtdbt_nl xmldom.DOMNodeList;
    grssrtdbt_n xmldom.DOMNode;
    currtdbt_nl xmldom.DOMNodeList;
    currtdbt_n xmldom.DOMNode;
    rtnnum2 number(20):=0;
    msgdnlt_nl xmldom.DOMNodeList;
    msgdnlt_n xmldom.DOMNode;
    lvdnlt_nl xmldom.DOMNodeList;
    lvdnlt_n xmldom.DOMNode;
    datdnlt_nl xmldom.DOMNodeList;
    datdnlt_n xmldom.DOMNode;
    grsdnlt_nl xmldom.DOMNodeList;
    grsdnlt_n xmldom.DOMNode;
    curdnlt_nl xmldom.DOMNodeList;
    curdnlt_n xmldom.DOMNode;
    limdnlt_nl xmldom.DOMNodeList;
    limdnlt_n xmldom.DOMNode;
    lvimp number(20);
    nullchk varchar2(30) ;
    chk_flseq number(10);
    fl_seq number(30);
    --these are the new variables
    TYPE tab_type IS TABLE OF FileControl%ROWTYPE;
    t_tab_FC tab_type := tab_type();
    TYPE tab_type1 IS TABLE OF MessageTab%ROWTYPE;
    t_tab1 tab_type1 := tab_type1();
    TYPE tab_type2 IS TABLE OF ContractsWithDefaultOfPayment%ROWTYPE;
    t_tab2 tab_type2 := tab_type2();
    TYPE tab_type3 IS TABLE OF CancellationTab%ROWTYPE;
    t_tab3 tab_type3 := tab_type3();
    TYPE tab_type4 IS TABLE OF ReturnDebitNoteTab%ROWTYPE;
    t_tab4 tab_type4 := tab_type4();
    TYPE tab_type5 IS TABLE OF DunningLettersTab%ROWTYPE;
    t_tab5 tab_type5 := tab_type5();
    cursor MessageCursor is
    select * from OM_BSN_STATEMSGS
    where PROCESSED is null AND SENT in(Select min(SENT) from OM_BSN_STATEMSGS
    where PROCESSED is null)
    order by sent asc;
    v_statemsgs OM_BSN_STATEMSGS%ROWTYPE;
    BEGIN
    DBMS_OUTPUT.put_line('creating parser');
    -- v_parser := DBMS_XMLPARSER.NEWPARSER;
    v_parser := DBMS_XMLPARSER.NEWPARSER();
    DBMS_OUTPUT.put_line('done creating');
    DBMS_XMLPARSER.setValidationMode(v_parser, true);
    DBMS_XMLPARSER.showWarnings(v_parser, true);
    open MessageCursor;
    loop
    fetch MessageCursor into v_statemsgs;
    exit when MessageCursor%NOTFOUND;
    DBMS_XMLPARSER.PARSECLOB(P => v_parser, DOC => v_statemsgs.MESSAGE);
    -- xmlparser.parse(v_parser, File_Location);
    v_doc := xmlparser.getDocument(v_parser);
    dbms_xmlparser.freeParser(v_parser); DBMS_OUTPUT.put_line('Step 1');
    v_nFCL := xslprocessor.selectNodes(xmldom.makeNode(v_doc),'/Statemessages/FileControl');
    v_nFCN := xmldom.item(v_nFCL,0);
    Source
    v_nFCSourceL := xslprocessor.selectNodes(xmldom.makeNode(v_doc),'/Statemessages/FileControl/Source');
    v_nFCSourceN := xmldom.item(v_nFCSourceL,0);
    Destination
    v_nFCDestinationL := xslprocessor.selectNodes(xmldom.makeNode(v_doc),'/Statemessages/FileControl/Destination');
    v_nFCDestinationN := xmldom.item(v_nFCDestinationL,0);
    -- Populate tab type for ORFC
    t_tab_FC.extend;
    t_tab_FC(t_tab_FC.last).creation_date := to_date(xslprocessor.valueOf(v_nFCN,'CreationDate'),'YYYY-MM-DD');
    t_tab_FC(t_tab_FC.last).src_sys_id := xslprocessor.valueOf(v_nFCSourceN,'SystemID');
    t_tab_FC(t_tab_FC.last).src_mandant_id := xslprocessor.valueOf(v_nFCSourceN,'MandantID');
    t_tab_FC(t_tab_FC.last).dest_sys_id := xslprocessor.valueOf(v_nFCDestinationN,'SystemID');
    t_tab_FC(t_tab_FC.last).dest_mandant_id := xslprocessor.valueOf(v_nFCDestinationN,'MandantID');
    t_tab_FC(t_tab_FC.last).seq_no := xslprocessor.valueOf(v_nFCN,'SequenceNumber');
    t_tab_FC(t_tab_FC.last).counter := xslprocessor.valueOf(v_nFCN,'Counter');
    --Saving the value of this seq_no so that it can be inserted in the message tab.
    sequence_no:= xslprocessor.valueOf(v_nFCN,'SequenceNumber');
    --Insert into ORFC TAB
    fl_seq := xslprocessor.valueOf(v_nFCN,'SequenceNumber');
    select count(*) into chk_flseq from FileControl where SEQ_NO =fl_seq;
    if (chk_flseq =0) then
    FOR each_FC IN t_tab_FC.first .. t_tab_FC.last LOOP
    INSERT INTO FileControl
    creation_date,
    src_sys_id,
    src_mandant_id,
    dest_sys_id,
    dest_mandant_id,
    seq_no,
    counter)
    VALUES
    t_tab_FC(each_FC).creation_date,
    t_tab_FC(each_FC).src_sys_id ,
    t_tab_FC(each_FC).src_mandant_id,
    t_tab_FC(each_FC).dest_sys_id,
    t_tab_FC(each_FC).dest_mandant_id,
    t_tab_FC(each_FC).seq_no,
    t_tab_FC(each_FC).counter
    END LOOP;
    end if;
    DBMS_OUTPUT.put_line('Step 2');
    if (chk_flseq =0) then /* chk the xml's filecontrol seq exists in filecontrltab */
    -- Use XPATH syntax to assign values to he elements of the collection.
    v_nl := xslprocessor.selectNodes(xmldom.makeNode(v_doc),'/Statemessages/Message');
    tpmsg := xmldom.getLength(v_nl);
    DBMS_OUTPUT.put_line('Message node length'||tpmsg);
    if (tpmsg>0) then
    FOR cur_emp IN 0 .. xmldom.getLength(v_nl) - 1 LOOP
    v_n := xmldom.item(v_nl, cur_emp);
    select (BISON_OM_MessageID.NEXTVAL) into var1 from dual;
    t_tab1.extend;
    t_tab1(t_tab1.last).message_id := var1;
    t_tab1(t_tab1.last).seq_no     := sequence_no;
    ---party reg
    m_prg := xslprocessor.selectNodes(v_n,'PartyRegistrationID');
    FOR Ref_Id_Loop IN 0 .. xmldom.getLength(m_prg) - 1 LOOP
    party_ref_node := xmldom.item(m_prg,0);
    part_refid_value := xslprocessor.valueOf(party_ref_node,'.');
    end loop;
    m_pr := xmldom.item(m_prg, 0);
    --changing
    --chang id
    parid_id_nl := xslprocessor.selectNodes(m_pr,'ID');
    DBMS_OUTPUT.put_line('Going to read PartyRegistrationID');
    FOR cur_parid_id IN 0 .. xmldom.getLength(parid_id_nl) - 1 LOOP
    parid_id_n := xmldom.item(parid_id_nl,cur_parid_id);
    DBMS_OUTPUT.put_line('Value of id:'|| xslprocessor.valueOf(parid_id_n,'.'));
    t_tab1(t_tab1.last).party_ref_id := xslprocessor.valueOf(parid_id_n,'.');
    exit;
    end loop ;
    ---- change id
    parid_typ_nl := xslprocessor.selectNodes(m_pr,'Type');
    FOR cur_parid_typ IN 0 .. xmldom.getLength(parid_typ_nl) - 1 LOOP
    parid_typ_n := xmldom.item(parid_typ_nl,cur_parid_typ);
    var_pr_reg_typ := xslprocessor.valueOf(parid_typ_n,'.');
    if var_pr_reg_typ='RG' then
    t_tab1(t_tab1.last).PARTY_REG_TYPE_RG := var_pr_reg_typ;
    elsif var_pr_reg_typ='AG' then
    t_tab1(t_tab1.last).PARTY_REG_TYPE_AG := var_pr_reg_typ;
    end if;
    end loop;
    --Chang
    -- t_tab1(t_tab1.last).PARTY_REG_TYPE_AG := xslprocessor.valueOf(m_pr,'Type');
    par_ref :=xslprocessor.valueOf(m_pr,'ID');
    t_tab1(t_tab1.last).customer_grp_id := xslprocessor.valueOf(v_n,'CustomerGroupID');
    t_tab1(t_tab1.last).name := xslprocessor.valueOf(v_n,'Name');
    t_tab1(t_tab1.last).subname := xslprocessor.valueOf(v_n,'Subname');
    t_tab1(t_tab1.last).datetime := xslprocessor.valueOf(v_n,'DateTime');
    DBMS_OUTPUT.put_line('Step 3 ContractsWithDefaultOfPayment');
    m_nl := xslprocessor.selectNodes(v_n,'DefaultOfPayment');
    m_n := xmldom.item(m_nl, 0);
    t_tab1(t_tab1.last).payment_msg_id := xslprocessor.valueOf(m_n,'MessageID');
    t_tab1(t_tab1.last).gross_amt_before := xslprocessor.valueOf(m_n,'GrossAmountBefore');
    t_tab1(t_tab1.last).gross_amt_current := xslprocessor.valueOf(m_n,'GrossAmountCurrent');
    t_tab1(t_tab1.last).currency := xslprocessor.valueOf(m_n,'Currency');
    t_tab1(t_tab1.last).settlemen_of_balance := xslprocessor.valueOf(m_n,'SettlementOfBalance');
    t_tab1(t_tab1.last).including_subsidiary_claim := xslprocessor.valueOf(m_n,'IncludingSubsidiaryClaim');
    condf_nl := xslprocessor.selectNodes(v_n,'ContractsWithDefaultOfPayment');
    condf_n := xmldom.item(condf_nl,0);
    condfpmt := xmldom.getLength(condf_nl);
    if (condfpmt > 0) then
    conid_nl := xslprocessor.selectNodes(condf_n,'ContractID');
    FOR cur_conid IN 0 .. xmldom.getLength(conid_nl) - 1 LOOP
    conid_n := xmldom.item(conid_nl,cur_conid);
    t_tab2.extend;
    t_tab2(t_tab2.last).message_id := var1;
    t_tab2(t_tab2.last).contract_id := xslprocessor.valueOf(conid_n,'.');
    end loop;
    condfpmt1 := 1;
    end if;
    cancl_nl := xslprocessor.selectNodes(v_n,'Cancellation');
    cancl_n := xmldom.item(cancl_nl,0);
    DBMS_OUTPUT.put_line('No of cancellations'||xmldom.getLength(cancl_nl) );
    canclnum := xmldom.getLength(cancl_nl) ;
    if (canclnum > 0) then
    canclid_nl := xslprocessor.selectNodes(cancl_n,'MessageID');
    FOR cur_canclid IN 0 .. xmldom.getLength(canclid_nl) - 1 LOOP
    canclid_n := xmldom.item(canclid_nl,cur_canclid);
    t_tab3.extend;
    t_tab3(t_tab3.last).message_id := var1;
    t_tab3(t_tab3.last).cancellation_msg_id := xslprocessor.valueOf(canclid_n,'.');
    end loop;
    canclnum1 :=1;
    end if; -- canclnum
    msgdtl_nl := xslprocessor.selectNodes(v_n,'Messagedetails');
    msgnum := xmldom.getLength(msgdtl_nl) ;
    dbms_output.put_line('msgggg::::'||msgnum);
    if (msgnum >0) then
    msgdtl_n := xmldom.item(msgdtl_nl,0);
    rtndbt_nl := xslprocessor.selectNodes(msgdtl_n,'ReturnDebitNote');
    rtndbt_n := xmldom.item(rtndbt_nl,0);
    rtnnum := xmldom.getLength(rtndbt_nl) ;
    if (rtnnum >0) then
    --return debit note
    msgrtdbt_nl := xslprocessor.selectNodes(rtndbt_n,'MessageID');
    kndrtdbt_nl := xslprocessor.selectNodes(rtndbt_n,'KindOf');
    rsnrtdbt_nl := xslprocessor.selectNodes(rtndbt_n,'Reason');
    datrtdbt_nl := xslprocessor.selectNodes(rtndbt_n,'Date');
    grssrtdbt_nl := xslprocessor.selectNodes(rtndbt_n,'GrossAmount');
    currtdbt_nl := xslprocessor.selectNodes(rtndbt_n,'Currency');
    rtnnum2 :=0;
    FOR cur_msgrtndbt IN 0 .. xmldom.getLength(msgrtdbt_nl) - 1 LOOP
    msgrtdbt_n := xmldom.item(msgrtdbt_nl,cur_msgrtndbt);
    kndrtdbt_n := xmldom.item(kndrtdbt_nl,cur_msgrtndbt);
    rsnrtdbt_n := xmldom.item(rsnrtdbt_nl,cur_msgrtndbt);
    datrtdbt_n := xmldom.item(datrtdbt_nl,cur_msgrtndbt);
    grssrtdbt_n := xmldom.item(grssrtdbt_nl,cur_msgrtndbt);
    currtdbt_n := xmldom.item(currtdbt_nl,cur_msgrtndbt);
    t_tab4.extend;
    t_tab4(t_tab4.last).message_id := var1;
    t_tab4(t_tab4.last).ret_debitnote_msg_id := xslprocessor.valueOf(msgrtdbt_n,'.');
    t_tab4(t_tab4.last).kind_of := xslprocessor.valueOf(kndrtdbt_n,'.');
    t_tab4(t_tab4.last).Reason := xslprocessor.valueOf(rsnrtdbt_n,'.');
    t_tab4(t_tab4.last).debit_note_date := to_date(xslprocessor.valueOf(datrtdbt_n,'.'),'YYYY-MM-DD');
    t_tab4(t_tab4.last).gross_amt := xslprocessor.valueOf(grssrtdbt_n,'.');
    t_tab4(t_tab4.last).currency := xslprocessor.valueOf(currtdbt_n,'.');
    rtnnum1 :=rtnnum1 + 1;
    rtnnum2 := rtnnum2 + 1;
    dbms_output.put_line('message_id::::'||var1);
    dbms_output.put_line('rtnnum2::::'||rtnnum2);
    dbms_output.put_line('ret_debitnote_msg_id:::'||t_tab4(t_tab4.last).ret_debitnote_msg_id);
    end loop;
    ----return debit note
    t_tab4(t_tab4.last).message_id := var1 ;
    t_tab4(t_tab4.last).ret_debitnote_msg_id := xslprocessor.valueOf(rtndbt_n,'MessageID');
    t_tab4(t_tab4.last).kind_of := xslprocessor.valueOf(rtndbt_n,'KindOf');
    t_tab4(t_tab4.last).reason := xslprocessor.valueOf(rtndbt_n,'Reason');
    t_tab4(t_tab4.last).debit_note_date := to_date(xslprocessor.valueOf(rtndbt_n,'Date'),'YYYY-MM-DD');
    t_tab4(t_tab4.last).gross_amt := xslprocessor.valueOf(rtndbt_n,'GrossAmount');
    t_tab4(t_tab4.last).currency := xslprocessor.valueOf(rtndbt_n,'Currency');
    rtnnum1 :=1;
    end if;
    dnlt_nl := xslprocessor.selectNodes(msgdtl_n,'DunningLetter');
    dnlt_n := xmldom.item(dnlt_nl, 0);
    dnnum := xmldom.getLength(dnlt_nl) ;
    if (dnnum >0) then
    -- t_tab5.extend;
    --dunning letter
    msgdnlt_nl := xslprocessor.selectNodes(dnlt_n,'MessageID');
    lvdnlt_nl := xslprocessor.selectNodes(dnlt_n,'Level');
    datdnlt_nl := xslprocessor.selectNodes(dnlt_n,'Date');
    grsdnlt_nl := xslprocessor.selectNodes(dnlt_n,'GrossAmount');
    curdnlt_nl := xslprocessor.selectNodes(dnlt_n,'Currency');
    limdnlt_nl := xslprocessor.selectNodes(dnlt_n,'LevelImprovement');
    FOR cur_msgdnlt IN 0 .. xmldom.getLength(msgdnlt_nl) - 1 LOOP
    msgdnlt_n := xmldom.item(msgdnlt_nl,cur_msgdnlt);
    lvdnlt_n := xmldom.item(lvdnlt_nl,cur_msgdnlt);
    datdnlt_n := xmldom.item(datdnlt_nl,cur_msgdnlt);
    grsdnlt_n := xmldom.item(grsdnlt_nl,cur_msgdnlt);
    curdnlt_n := xmldom.item(curdnlt_nl,cur_msgdnlt);
    limdnlt_n := xmldom.item(limdnlt_nl,cur_msgdnlt);
    t_tab5.extend;
    t_tab5(t_tab5.last).message_id := var1;
    t_tab5(t_tab5.last).dunning_msg_id := xslprocessor.valueOf(msgdnlt_n,'.');
    t_tab5(t_tab5.last).d_level := xslprocessor.valueOf(lvdnlt_n,'.');
    t_tab5(t_tab5.last).dunning_date := to_date(xslprocessor.valueOf(datdnlt_n,'.'),'YYYY-MM-DD');
    t_tab5(t_tab5.last).gross_amt := xslprocessor.valueOf(grsdnlt_n,'.');
    t_tab5(t_tab5.last).currency := xslprocessor.valueOf(curdnlt_n,'.');
    lvimp := xmldom.getLength(limdnlt_nl);
    begin
    t_tab5(t_tab5.last).level_improvement := xslprocessor.valueOf(limdnlt_n,'.');
    EXCEPTION
    WHEN OTHERS THEN
    t_tab5(t_tab5.last).level_improvement := null;
    end;
    dnnum1 :=dnnum1 + 1;
    -- dnnum2 := dnnum2 + 1;
    dbms_output.put_line('message_id::::'||var1);
    end loop;
    ----dunning letter
    t_tab5(t_tab5.last).message_id := var1;
    t_tab5(t_tab5.last).dunning_msg_id := xslprocessor.valueOf(dnlt_n,'MessageID');
    t_tab5(t_tab5.last).d_level := xslprocessor.valueOf(dnlt_n,'Level');
    t_tab5(t_tab5.last).dunning_date := to_date(xslprocessor.valueOf(dnlt_n,'Date'),'YYYY-MM-DD');
    t_tab5(t_tab5.last).gross_amt := xslprocessor.valueOf(dnlt_n,'GrossAmount');
    t_tab5(t_tab5.last).currency := xslprocessor.valueOf(dnlt_n,'Currency');
    t_tab5(t_tab5.last).level_improvement := xslprocessor.valueOf(dnlt_n,'LevelImprovement');
    dnnum1 :=1; */
    end if;
    end if;
    END LOOP;
    -- Insert data into the real EMP table from the table collection.
    -- Form better performance multiple collections should be used to allow
    -- bulk binding using the FORALL construct but this would make the code
    -- too long-winded for this example.
    DBMS_OUTPUT.put_line('Step 5');
    FOR cur_emp IN t_tab1.first .. t_tab1.last LOOP
    INSERT INTO MessageTab
    message_id,
    PARTY_REF_ID,
    PARTY_REG_TYPE_AG,
    party_reg_type_rg,
    customer_grp_id,
    name,
    subname,
    datetime,
    payment_msg_id,
    gross_amt_before,
    gross_amt_current,
    currency,
    settlemen_of_balance,
    including_subsidiary_claim,
    seq_no)
    VALUES
    t_tab1(cur_emp).message_id,
    t_tab1(cur_emp).PARTY_REF_ID,
    t_tab1(cur_emp).PARTY_REG_TYPE_AG,
    t_tab1(cur_emp).PARTY_REG_TYPE_RG,
    t_tab1(cur_emp).customer_grp_id,
    t_tab1(cur_emp).name,
    t_tab1(cur_emp).subname,
    t_tab1(cur_emp).datetime,
    t_tab1(cur_emp).payment_msg_id,
    t_tab1(cur_emp).gross_amt_before,
    t_tab1(cur_emp).gross_amt_current,
    t_tab1(cur_emp).currency,
    t_tab1(cur_emp).settlemen_of_balance,
    t_tab1(cur_emp).including_subsidiary_claim,
    t_tab1(cur_emp).seq_no
    END LOOP;
    DBMS_OUTPUT.put_line('Step 6');
    if (condfpmt1 > 0) then
    FOR cur_cnf IN t_tab2.first .. t_tab2.last LOOP
    INSERT INTO ContractsWithDefaultOfPayment
    (message_id,contract_id)
    values
    (t_tab2(cur_cnf).message_id,t_tab2(cur_cnf).contract_id );
    end loop;
    end if; -- condfpmt
    if (canclnum1 > 0) then
    FOR cur_cancl IN t_tab3.first .. t_tab3.last LOOP
    INSERT INTO CancellationTab
    (message_id,cancellation_msg_id)
    VALUES
    (t_tab3(cur_cancl).message_id,t_tab3(cur_cancl).cancellation_msg_id);
    END LOOP;
    end if;
    DBMS_OUTPUT.put_line('Step 7');
    if (rtnnum1 >0) then
    FOR cur_rtndb IN t_tab4.first .. t_tab4.last LOOP
    INSERT INTO ReturnDebitNoteTab
    (message_id,
    ret_debitnote_msg_id,
    kind_of,
    reason,
    debit_note_date,
    gross_amt,
    currency
    VALUES
    (t_tab4(cur_rtndb).message_id,
    t_tab4(cur_rtndb).ret_debitnote_msg_id,
    t_tab4(cur_rtndb).kind_of,
    t_tab4(cur_rtndb).reason,
    t_tab4(cur_rtndb).debit_note_date,
    t_tab4(cur_rtndb).gross_amt,
    t_tab4(cur_rtndb).currency);
    END LOOP;
    end if;
    if (dnnum1 >0) then
    FOR cur_dnl IN t_tab5.first .. t_tab5.last LOOP
    INSERT INTO DunningLettersTab
    (message_id,
    dunning_msg_id,
    d_level,
    dunning_date,
    gross_amt,
    currency,
    level_improvement)
    VALUES
    (t_tab5(cur_dnl).message_id,
    t_tab5(cur_dnl).dunning_msg_id,
    t_tab5(cur_dnl).d_level,
    t_tab5(cur_dnl).dunning_date,
    t_tab5(cur_dnl).gross_amt,
    t_tab5(cur_dnl).currency,
    t_tab5(cur_dnl).level_improvement
    END LOOP;
    DBMS_OUTPUT.put_line('Step 8');
    end if; -- dnn
    end if; -- top msg
    end if; --- fl_seq chk
    COMMIT;
    -- Free any resources associated with the document now it
    -- is no longer needed.
    xmldom.freeDocument(v_doc);
    /* refresh array */
    t_tab_FC.delete;
    t_tab1.delete;
    t_tab2.delete;
    t_tab3.delete;
    t_tab4.delete;
    t_tab5.delete;
    /* refsh */
    end loop;
    close MessageCursor;
    END ;
    //

    Errors thrown by Oracle always show a line number (even if it points to the FOR loop that the error occurred within). When you run it, what is the error stack that is being returned. Copy and paste that, don't summarize it.
    If you are still uncertain, add a final
    EXCEPTION
      WHEN OTHERS THEN
         dbms_output.put_line(DBMS_UTILITY.FORMAT_ERROR_BACKTRACE);to have it written out where your normal dbms_output goes. This is your friend in 10g for tracking down errors.
    "But as soon as i add a prefix in the header everything works fine."
    Is that header in the sample XML you provided? Regardless what are you adding? Your data is a clob so you can always tweak it before converting it to a DOMDocument just by doing simple string manipulation.
    Since you are in 10g, you should be using dbms_xmldom instead of xmldom. I think xmldom is just a synonym for dbms_xmldom though. Review the dbms_xmldom documentation. You can go straight from a clob to a DOMDocument via DBMS_XMLDOM.NEWDOMDOCUMENT. You can also parse the document completely using dbms_xmldom calls instead of xslprocessor calls.
    Other random things to evaluate:
    Consider turning
             FOR each_FC IN t_tab_FC.first .. t_tab_FC.last LOOP
                INSERT INTO FileControl
    into a
             FORALL i IN t_tab_FC.first .. t_tab_FC.last LOOP
                INSERT INTO FileControl
                 ...Better performance because one two context switches (PL/SQL -> SQL -> PL/SQL) instead of 2*n switches.
    I like this construct better
       TYPE tab_type IS TABLE OF FileControl%ROWTYPE INDEX BY BINARY_INTEGER;
       t_tab_FC tab_type := tab_type;because then you don't have to       t_tab_FC.extend;you can just do something like     index := 1;
         LOOP
            t_tab_FC(index).creation_date := <whatever>;
            index := index + 1;
         END LOOPYou also have the option of parsing your XML as a XMLType, including purely in SQL, but you can research that avenue at a later date.
    Forgot to mention, wrap any code examples in [ pre ] [ pre ] (without the spaces) to retain your formatting.

  • Parse XML in PL/SQL

    I need help with parsing xml data in PL/SQL. I was able to read the attribute name & values but not able to read the element text.Any help is greatly appreciated.Following is the anonymous block and the desired output -
    Declare
    nl xmldom.DOMNodeList;
    len1 number;
    len2 number;
    n xmldom.DOMNode;
    e xmldom.DOMElement;
    nnm xmldom.DOMNamedNodeMap;
    attrname varchar2(100);
    attrval varchar2(100);
    doc xmldom.DOMDocument;
    p xmlparser.Parser;
    in_xml clob;
    begin
    -- get all elements
    p := xmlparser.newParser;
    in_xml := '<?xml version="1.0" encoding="utf-8"?>
    <Issue>
    <T_ISSUE_TITLE ID = "1">Test Issue</T_ISSUE_TITLE>
    <T_ISSUE_DESC ID = "2">Update Test Issue</T_ISSUE_DESC>
    <STATUS ID = "3">2</STATUS>
    <ISSUE_SD ID = "4">07/09/10</ISSUE_SD>
    <ISSUE_ED ID = "5">09/09/10</ISSUE_ED>
    <CREATE_DT ID = "6">07/09/10</CREATE_DT>
    <CREATE_USER_ID ID = "7">John</CREATE_USER_ID>
    <LST_UPD_USER_ID ID = "8">John</LST_UPD_USER_ID>
    </Issue>';
    xmlparser.parseClob(p,in_xml);
    doc :=xmlparser.getDocument(p);
    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);
    len2 := xmldom.getLength(nnm);
    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);
    --dbms_output.put_line(n);
    attrname := xmldom.getNodeName(n);
    attrval := xmldom.getNodeValue(n);
    dbms_output.put_line(' ' || attrname || ' = ' || attrval);
    end loop;
    end if;
    end loop;
    end;
    /** Output
    Issue:
    T_ISSUE_TITLE:
    ID = 1, Test Issue
    T_ISSUE_DESC:
    ID = 2, Update Test Issue
    STATUS:
    ID = 3, 2
    ISSUE_SD:
    ID = 4, 07/09/10
    ISSUE_ED:
    ID = 5, 09/09/10
    CREATE_DT:
    ID = 6, 07/09/10
    CREATE_USER_ID:
    ID = 7, John
    LST_UPD_USER_ID:
    ID = 8, John
    Thank You.

    Use dbms_xslprocessor.valueOf and dbms_xmldom.getnodevalue to get the value of node
    eg: l_doc is paresed XML doc with nodes as partdetails and part
    declare
      l_n       dbms_xmldom.DOMNode;
      l_nl      dbms_xmldom.DOMNodeList;
    l_partname varchar2(100);
    begin
    ---parsing code--
    l_nl := dbms_xslprocessor.selectNodes(dbms_xmldom.makeNode(l_doc),'/PartDetails/Part');
    FOR cur_emp IN 0 .. dbms_xmldom.getLength(l_nl) - 1 LOOP
      l_n := dbms_xmldom.item(l_nl, cur_emp);
      dbms_xslprocessor.valueOf(l_n,'Name/text()',l_partname);
    dbms_output.put_line(l_partname);
    end loop;
    end;Edited by: SBH on Jul 13, 2010 11:06 AM

  • Slicing a CLOB

    I am pulling from what is equivalent to a CLOB in Oracle from a Sybase table.
    Is there a way I can select only part of the CLOB for a particular id?
    This CLOB has comments for all ids. However I need to be able to pull a comment for each id. I have a table in Oracle with a column name of COMMENTS.
    I need to map the comment with the id it belongs too. Is it possible?

    Are you working with a Sybase database? Or an Oracle database?
    Does the COMMENTS table have a single row in it? Or does it have one row per "particular id"?
    If there is a single CLOB with comments for all id's, you would have to parse the CLOB-- the DBMS_LOB package has a number of functions to do this assuming you are using Oracle. But this package is not available in Sybase. And you'd need to know the internal structure of your data to know how to write the logic to go about parsing the data.
    Justin

  • Error in parsing special characters

    We are getting the following error when we parse a clob with special characters like \226(- special dash char), \231(the "TM"-Trademark logo), \256(the "R"-Registered logo )
    "Invalid char in text" when the parser is loaded in the db.
    But when we tried to parse this xml file as a file input (parser is now outside the db), it parses the file fine and inserts the data into the db.
    We are wondering if there is a difference in parser parsing special characters between inside and outside the db.
    We are running xml parser version 2.0.2.7 and if this is a bug and being fixed in later version, is there a workaround for this version

    Please try our latest 9.0.1 version

  • 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

  • XML as CLOB parameter to procedure

    I'm trying to insert data from an XML file into tables/columns via a stored procedure. The procedure is part is as follows:
    create or replace procedure ParseSomeXMLTest
    xmlDoc in CLOB, someID out int
    as
    doc xmldom.DOMDocument;
    parser xmlparser.Parser;
    begin
    parser := xmlparser.newParser;
    xmlparser.parseClob(parser, xmlDoc);
    doc := xmlparser.getDocument(parser);
    xmlparser.freeParser(parser);
    When I call parseClob I get an ORA-20100 error complaining about the syntax of the XML file. If I cut my XML down to < 32K it works just fine.
    If I write the CLOB to disk, read it out again and process it, it also works, as follows:
    create or replace procedure ParseSomeXMLTest
    xmlDoc in CLOB, someID out int
    as
    doc xmldom.DOMDocument;
    parser xmlparser.Parser;
    test CLOB;
    begin
    insert into junk values(xmlDoc);
    commit;
    select xmldata into test from junk;
    delete from junk;
    commit;
    parser := xmlparser.newParser;
    xmlparser.parseClob(parser, test);
    doc := xmlparser.getDocument(parser);
    xmlparser.freeParser(parser);
    The problem is that it's entirely too slow to insert the CLOB, select it back out again and delete it. It takes around 4 seconds to do that. It takes me less than 1 second to actually process the XML once it's parsed. Increasing my process by 4x isn't an option.
    Since the parseClob works on a "CLOB" I can only assume that I'm not truly passing in a CLOB from my C++/C# applications. I've used both the ODP.NET and the Microsoft's Oracle .NET provider in C# and the Oracle OLEDB provider in C++.
    Here's a sample of my C# code:
    OracleConnection connect = new OracleConnection("Data Source=ds;user id=UID;password=PWD;");
    connect.Open();
    OracleCommand insCmd = new OracleCommand("ParseSomeXMLTest", connect);
    insCmd.CommandType = CommandType.StoredProcedure;
    OracleParameter param = insCmd.Parameters.Add("xmlDoc", OracleDbType.Clob);
    param.Direction = ParameterDirection.Input;
    StreamReader reader = File.OpenText("c:\\oracletest.xml");
    param.Value = reader.ReadToEnd();
    OracleParameter param2 = insCmd.Parameters.Add("someID", OracleDbType.Int32);
    param2.Direction = ParameterDirection.Output;
    insCmd.ExecuteNonQuery();
    long id = Convert.ToInt32(param2.Value);
    Anyone have any ideas?

    Hey!
    I'm using the samme stuff ... while calling from .NET (c#) , it give me the error.
    "Wrong number of arguments"...
         oraconn.Open();
                             // Create a oracle Command
                             OracleCommand oCmd = new OracleCommand();
                             oCmd.CommandType = CommandType.StoredProcedure;
                             oCmd.CommandText ="sp_CV_InsertXmldetails";
                             oCmd.Connection = oraconn;
                             OracleParameter inputParam;
                             inputParam =oCmd.Parameters.Add("param_xml",System.Data.OracleClient.OracleType.Clob);
                             inputParam.Direction = ParameterDirection.Input;
                             StreamReader rd1 = File.OpenText("c:\\clob.xml");
                             inputParam.Value = rd1.ReadToEnd();
                             oCmd.ExecuteNonQuery();
    In the Sp
    create or replace sp_CV_InsertXmldetails(param_xml in clob)
    AS
    BEGIN
    // xml parsing stuf
    END

  • Parse xml response from PL/SQL

    Can anyone please help me parse the xml below?
    DECLARE
       l_response     CLOB;
       g_system_id    VARCHAR2 (255);
       g_session_id   VARCHAR2 (255);
       g_user_id      VARCHAR2 (255);
    BEGIN
       l_response :=
          '--uuid:18cb22a2-11cc-43f4-bfea-c213da179d30+id=156
    Content-ID: <http://tempuri.org/0>
    Content-Transfer-Encoding: 8bit
    Content-Type: application/xop+xml;charset=utf-8;type="application/soap+xml"
    <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header><a:Action s:mustUnderstand="1">http://tempuri.org/ILoginService/LoginByUserNameResponse</a:Action><a:RelatesTo>urn:uuid:cf410a05-23d4-4b92-a22c-329cbc19fbe7</a:RelatesTo></s:Header><s:Body><LoginByUserNameResponse xmlns="http://tempuri.org/"><LoginByUserNameResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://www.w3.org/2001/XMLSchema"><XObject.m_element i:type="x:string" xmlns="">&lt;OnlineContext SystemId="{19E0DDB4-5FA5-41EE-B624-AEA762865A6C}" SessionId="{F23D32A4-B325-4BFA-9E90-39CA253E843C}" UserId="{2C6ABE4C-D356-46F0-B4BE-9C4F0A36A522}" /&gt;</XObject.m_element></LoginByUserNameResult></LoginByUserNameResponse></s:Body></s:Envelope>
    --uuid:18cb22a2-11cc-43f4-bfea-c213da179d30+id=156--';
          SELECT systemid, sessionid, userid
            INTO g_session_id, g_system_id, g_user_id
            FROM XMLTABLE (
                    xmlnamespaces ('http://www.w3.org/2003/05/soap-envelope' AS "data"),
                    'data:LoginByUserNameResponse/LoginByUserNameResult/XObject.m_element/OnlineContext'
                    PASSING xmltype (l_response)
                    COLUMNS systemid VARCHAR2 (50) PATH '@OnlineContext',
                            sessionid VARCHAR2 (50) PATH '@OnlineContext',
                            userid VARCHAR2 (50) PATH '@OnlineContext') xt;
       DBMS_OUTPUT.put_line (
             'Session id '
          || g_session_id
          || ' System id '
          || g_system_id
          || ' User id '
          || g_user_id);
    END;
    Thanks.

    This gets you a little bit closer
    declare 
    -- Local variables here
    l_response     CLOB;
    g_system_id    VARCHAR2 (255);
    g_session_id   VARCHAR2 (255);
    g_user_id      VARCHAR2 (255);
    begin
    -- Test statements here
    l_response := '<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"> 
    <s:Header>
        <a:Action s:mustUnderstand="1">http://tempuri.org/ILoginService/LoginByUserNameResponse</a:Action> 
        <a:RelatesTo>urn:uuid:cf410a05-23d4-4b92-a22c-329cbc19fbe7</a:RelatesTo>
    </s:Header>
    <s:Body>
        <LoginByUserNameResponse xmlns="http://tempuri.org/"> 
           <LoginByUserNameResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://www.w3.org/2001/XMLSchema"> 
              <XObject.m_element i:type="x:string" xmlns=""><OnlineContext SystemId="{19E0DDB4-5FA5-41EE-B624-AEA762865A6C}" SessionId="{F23D32A4-B325-4BFA-9E90-39CA253E843C}" UserId="{2C6ABE4C-D356-46F0-B4BE-9C4F0A36A522}" /></XObject.m_element>
              </LoginByUserNameResult>
          </LoginByUserNameResponse>
      </s:Body>
    </s:Envelope>';
        SELECT systemid, sessionid, userid
          INTO g_session_id, g_system_id, g_user_id
          FROM XMLTABLE (
                  xmlnamespaces ('http://www.w3.org/2003/05/soap-envelope' AS "s", 
                                 'http://tempuri.org/' as "data"), 
                  's:Envelope/s:Body/data:LoginByUserNameResponse/data:LoginByUserNameResult/XObject.m_element/OnlineContext'
                  PASSING xmltype (l_response)
                  COLUMNS systemid VARCHAR2 (50) PATH '@SystemId',
                          sessionid VARCHAR2 (50) PATH '@SessionId',
                          userid VARCHAR2 (50) PATH '@UserId') xt;
    DBMS_OUTPUT.put_line (
           'Session id '
        || g_session_id
        || ' System id '
        || g_system_id
        || ' User id '
        || g_user_id);
    end;    
    You will need to manually parse that CLOB and pull out the XML string itself from the response.  That can be done via SUBSTR and INSTR looking for the first < and last > in what you showed at least.  Updated from previous version to work properly with the xmlns="", which resets the default namespace back to the default value.  The XPath was corrected to reflect proper prefix usage.

  • Serializing a CLOB using PL/SQL

    Is there a way to get the results of:
    'SELECT xmlgen.getXML("select * from EMP")
    from dual'
    in serialized form rather than as a CLOB?
    Basically to bypass the creation of the CLOB and just return the XML rows as they are created?
    I want to get the same result I would get if the XML CLOB was written to a file and then the file was loaded into a table with one column defined as a varchar2(2000); each record in the file would be one record in the table. Naturally I want to avoid the file altogether.
    I can write a procedure that parses the CLOB and creates a table but I would like to avoid the table also. I'm not sure if a function returning a REF cursor would work.
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Rick Post:
    Is there a way to get the results of:
    'SELECT xmlgen.getXML("select * from EMP")
    from dual'
    in serialized form rather than as a CLOB?
    Basically to bypass the creation of the CLOB and just return the XML rows as they are created?
    I want to get the same result I would get if the XML CLOB was written to a file and then the file was loaded into a table with one column defined as a varchar2(2000); each record in the file would be one record in the table. Naturally I want to avoid the file altogether.
    I can write a procedure that parses the CLOB and creates a table but I would like to avoid the table also. I'm not sure if a function returning a REF cursor would work.
    <HR></BLOCKQUOTE>
    Write a simple PLSQL function like this:
    function get_buf(page in CLOB) return VARCHAR2 is
    buf_t LONG RAW;
    amount BINARY_INTEGER := 32768;
    begin
    dbms_lob.read(page,amount,0,buf_t);
    return utl_raw.cast_to_varchar2(buf_t);
    end;
    And add the correct pragme to be use this function into select statement (WRNDS,WRNPS):
    then use it like this:
    'SELECT get_buf(xmlgen.getXML("select * from EMP")) from dual'
    Hope this help, Marcelo.

  • Creating a PL/SQL table based on XML file.

    I have created two procedures to try and achieve the problem at hand.
    It retrieves and displays the record from a DBMS_OUTPUT.PUT_LINE prospective as indicated in (1&2), but I am having difficulty loading these values into a PL/SQL table from the package labeled as (3).
    All code compiles. (1&2) work together, (3) works by itself but will not populate the table, and I get no errors.
    1.The first being the one that retrieves the XML file and parses it.
    CREATE OR REPLACE procedure xml_main is
    P XMLPARSER.Parser;
    DOC CLOB;
    v_xmldoc xmldom.DOMDocument;
    v_out CLOB;
    BEGIN
    P := xmlparser.newParser;
    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>';
    --v_out  := DOC;
    SYS.XMLPARSER.PARSECLOB ( P, DOC );
    v_xmldoc := SYS.XMLPARSER.getDocument(P);
    --DBMS_LOB.createtemporary(v_out,FALSE,DBMS_LOB.SESSION);
    --v_out := SYS.XMLPARSER.PARSECLOB ( P, DOC );
    --SYS.XMLDOM.writetoCLOB(v_xmldoc, v_out);
    --INSERT INTO TEST (TEST_COLUMN)
    --VALUES(V_OUT);
    --printElements(v_xmldoc);
    printElementAttributes(v_xmldoc);
    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, 'Wrong doc error');
    when xmldom.INVALID_CHARACTER_ERR then
    raise_application_error(-20120, 'Invalid Char error');
    when xmldom.NO_DATA_ALLOWED_ERR then
    raise_application_error(-20120, 'Nod data allowed error');
    when xmldom.NO_MODIFICATION_ALLOWED_ERR then
    raise_application_error(-20120, 'No mod 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 attr error');
    END;
    2. The second which displays the values from the .xml file I initialized above.
    CREATE OR REPLACE 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);
    text_value VARCHAR2(100):=NULL;
    n_child XMLDOM.DOMNODE;
    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);
         n_child:=xmldom.getFirstChild(n);
    text_value:=xmldom.getNodeValue(n_child);
    dbms_output.put_line('val='||text_value);
    IF (xmldom.isNull(nnm) = FALSE) THEN
    len2 := xmldom.getLength(nnm);
              dbms_output.put_line('length='||len2);
    -- 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;
    3. The package trying to insert into a PL/SQL table.
    CREATE OR REPLACE PACKAGE BODY XMLSTUD2 AS
    PROCEDURE STUDLOAD
    IS
    v_parser xmlparser.Parser;
    v_doc xmldom.DOMDocument;
    v_nl xmldom.DOMNodeList;
    v_n xmldom.DOMNode;
    DOC CLOB;
    v_out CLOB;
    n2 XMLDOM.DOMNODELIST;
    TYPE stuxml_type IS TABLE OF STUDENTS%ROWTYPE;
    s_tab stuxml_type := stuxml_type();
    --l_sturec students%rowtype;
    BEGIN
    -- Create a parser.
    v_parser := xmlparser.newParser;
    xmlparser.setValidationMode(v_parser, 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>';
    -- Parse the document and create a new DOM document.
    SYS.XMLPARSER.PARSECLOB ( v_parser, DOC );
    v_doc := SYS.XMLPARSER.getDocument(v_parser);
    -- Free resources associated with the Parser now it is no longer needed.
    xmlparser.freeParser(v_parser);
    -- Get a list of all the STUD nodes in the document using the XPATH syntax.
    v_nl := xslprocessor.selectNodes(xmldom.makeNode(v_doc),'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address');
    dbms_output.put_line( 'New Stud processed on '||to_char(sysdate, 'YYYY-MON-DD'));
    -- Loop through the list and create a new record in a tble collection
    -- for each STUD record.
    FOR stud IN 0 .. xmldom.getLength(v_nl) - 1 LOOP
    v_n := xmldom.item(v_nl, stud);
    s_tab.extend;
    -- Use XPATH syntax to assign values to he elements of the collection.
         --s_tab(s_tab.last).STUDENT_ID :=xslprocessor.valueOf(v_n,'StudentNumber');
         --s_tab(s_tab.last).SSN :=xslprocessor.valueOf(v_n,'ExternalIdNumber');
         --s_tab(s_tab.last).SHISID :=xslprocessor.valueOf(v_n,'StateIdNumber');
         s_tab(s_tab.last).STUDENT_LAST_NAME :=xslprocessor.valueOf(v_n,'LastName');
         --dbms_output.put_line( s_tab(s_tab.last).STUDENT_LAST_NAME);
         s_tab(s_tab.last).STUDENT_FIRST_NAME :=xslprocessor.valueOf(v_n,'FirstName');
         --s_tab(s_tab.last).STUDENT_MI :=xslprocessor.valueOf(v_n,'MiddleName');
         --s_tab(s_tab.last).STUDENT_GENDER :=xslprocessor.valueOf(v_n,'Gender');
         --s_tab(s_tab.last).SHISID :=xslprocessor.valueOf(v_n,'Month');
         --s_tab(s_tab.last).SHISID :=xslprocessor.valueOf(v_n,'Day');
         --s_tab(s_tab.last).SHISID :=xslprocessor.valueOf(v_n,'Year');
         --s_tab(s_tab.last).STUDENT_RACE :=xslprocessor.valueOf(v_n,'Race');
         --s_tab(s_tab.last).STUDENT_ETHNIC :=xslprocessor.valueOf(v_n,'Ethnicity');
         --s_tab(s_tab.last).STUDENT_PRI_LANG :=xslprocessor.valueOf(v_n,'PrimaryLanguage');
         --s_tab(s_tab.last).STUDENT_SEC_LANG :=xslprocessor.valueOf(v_n,'HouseholdLanguage');
         --s_tab(s_tab.last).STUDENT_STREET :=xslprocessor.valueOf(v_n,'Street');
         --s_tab(s_tab.last).STUDENT_APART_NO :=xslprocessor.valueOf(v_n,'ApartmentNumber');
         --s_tab(s_tab.last).STUDENT_COUNTY :=xslprocessor.valueOf(v_n,'City'); 
         --s_tab(s_tab.last).STUDENT_COUNTY :=xslprocessor.valueOf(v_n,'County');
         --s_tab(s_tab.last).STUDENT_STATE :=xslprocessor.valueOf(v_n,'State');
         --s_tab(s_tab.last).STUDENT_ZIP :=xslprocessor.valueOf(v_n,'ZipCode');
    END LOOP;
    FOR stud IN s_tab.first..s_tab.last LOOP
    dbms_output.put_line( s_tab(s_tab.last).STUDENT_LAST_NAME);
    INSERT INTO STUDENTS (
    SHISID, SSN, DOE_SCHOOL_NUMBER,
    PATIENT_TYPE, TEACHER, HOMEROOM,
    STUDENT_LAST_NAME, STUDENT_FIRST_NAME, STUDENT_MI,
    STUDENT_DOB, STUDENT_BIRTH_CERT, STUDENT_COMM,
    STUDENT_MUSA, STUDENT_FAMSIZE, STUDENT_FAMINCOME,
    STUDENT_UNINSURED, STUDENT_LUNCH, STUDENT_ZIP,
    STUDENT_STATE, STUDENT_COUNTY, STUDENT_STREET,
    STUDENT_APART_NO, STUDENT_PHONE, STUDENT_H2O_TYPE,
    STUDENT_WASTE_TRT, STUDENT_HOME_SET, STUDENT_NONHOME_SET,
    STUDENT_GENDER, STUDENT_RACE, STUDENT_ETHNIC,
    STUDENT_PRI_LANG, STUDENT_SEC_LANG, STUDENT_ATRISK,
    EMER_COND_MEMO, ASSIST_DEVICE_TYPE, SCHOOL_ENTER_AGE,
    STUDENT_CURR_GRADE, S504_ELIG_DATE, S504_DEV_DATE,
    S504_REV_DATE, STUDENT_504, STUDENT_IEP,
    IEP_EXP_DATE, GRAD_CLASS, TYPE_DIPLOMA,
    GRADE_RETAIN, LIT_PASS_TEST_MATH, LIT_PASS_DATE_MATH,
    LIT_PASS_TEST_WRITE, LIT_PASS_DATE_WRITE, LIT_PASS_TEST_READ,
    LIT_PASS_DATE_READ, SPEC_ED_ELIG, SPEC_ED_CODE,
    TRANSPORT_CODE, TRANSPORT_NO, PRIME_HANDICAP,
    PRIME_HANDICAP_PERCENT, PRIME_HANDI_MANAGER, FIRST_ADD_HANDI,
    FIRST_ADD_HANDICAP_PERCENT, FIRST_ADD_HANDI_504, FIRST_ADD_HANDI_504_DATE,
    SECOND_ADD_HANDI, SECOND_ADD_HANDICAP_PERCENT, MED_EXTERNAL_NAME,
    INS_TYPE, INS_PRI, INS_NAME,
    INS_MEDICAID_NO, ELIGDATE, INS_PRIV_INSURANCE,
    INS_APPR_BILL, INS_APPR_DATE, INS_PARENT_APPR,
    INS_POL_NAME, INS_POL_NO, INS_CARRIER_NO,
    INS_CARRIER_NAME, INS_CARRIER_RELATE, INS_AFFECT_DATE,
    INS_COPAY_OV, INS_COPAY_RX, INS_COPAY_AMBUL,
    INS_COPAY_EMER, INS_COPAY_OUTPAT, STUDENT_INACTIVE,
    PHYS_ID, ENCOUNTERNUM, USERID,
    MODDATE, STUDENT_ID, S504_DISABILITY,
    CHAPTER1, WELLNESS_ENROLL, SCHOOL_OF_RESIDENCE,
    INITIAL_IEP_DATE, CALENDAR_TRACK, USA_BORN,
    ALT_ID, FUTURE_SCHOOL, IEP_LAST_MEETING,
    IEP_LAST_SETTING, IEP_LAST_REFER_EVAL, THIRD_ADD_HANDI,
    LEP, GIFTED, IEP_EXIT_REASON,
    CASE_MANAGER_ID, INTAKE_NOTES, CALLER_PHONE,
    CALL_DATE, CALLER_RELATIONSHIP, CALLER_NAME,
    BUSINESS_PHONE, FAX, EMAIL,
    HIGHEST_EDUCATION, INTAKE_DATE, SERVICE_COORDINATOR,
    DISCHARGE_DATE, DISCHARGE_REASON, DISCHARGE_NOTES,
    INTAKE_BY, INTAKE_STATUS, IEP_LAST_SERVED_DATE,
    IEP_APC_DATE, IEP_EXIT_DATE, ADDRESS2,
    LEGAL_STATUS, RELIGION, EMPLOYMENT_STATUS,
    TARG_POP_GROUP1, TARG_POP_GROUP2, MARITAL_STATUS,
    THIRD_ADD_HANDI_PERCENT, LAST_INTERFACE_DATE, SERVICE_PLAN_TYPE,
    CURRENT_JURISDICTION, FIPS, BIRTH_PLACE_JURISDICTION,
    BIRTH_PLACE_HOSPITAL, BIRTH_PLACE_STATE, BIRTH_PLACE_COUNTRY,
    OTHER_CLIENT_NAME, SIBLINGS_WITH_SERVICES, PERM_SHARE_INFORMATION,
    PERM_VERIFY_INSURANCE, REFERRING_AGENCY, REFERRING_INDIVIDUAL,
    AUTOMATIC_ELIGIBILITY, INTAKE_IEP_ID, FUTURE_SCHOOL2,
    FUTURE_SCHOOL3, TRANSLATOR_NEEDED, TOTAL_CHILDREN_IN_HOME,
    REFERRED_BY, FAMILY_ID, SCREENING_CONSENT_FLAG,
    PICTURE_FILE, DUAL_ENROLLED, DOE_SCHOOL_NUMBER2)
    VALUES (123456789012, null,null ,
    null,null,null ,s_tab(stud).STUDENT_LAST_NAME
    , s_tab(stud).STUDENT_LAST_NAME,null ,
    null ,null ,null ,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null, null,null );
    END LOOP;
    COMMIT;
    -- Free any resources associated with the document now it
    -- is no longer needed.
    xmldom.freeDocument(v_doc);
    END STUDLOAD;
    END XMLSTUD2;
    /

    Hi
    I have created a PLSQL package based Oracle Portal
    form. This is created a s a databse provider. I have
    following questions to check :
    1. How to capture return values from the package and
    display different messages on success or failure ?
    - http://download.oracle.com/docs/cd/B14099_19/portal.1014/b14135/pdg_portletbuilder.htm#BABBAFGI
    Step 16
    2. How to return to blank form by intializing already
    entered values after successfuly process of the form
    data.
    - http://download.oracle.com/docs/cd/B14099_19/portal.1014/b14135/pdg_portletbuilder.htm#BABGBCHH
    thanks
    Manjith

  • Loading datafrom a PL/SQL table into the Database table

    I have created two procedures to try and achieve the problem at hand.
    It retrieves and displays the record from a DBMS_OUTPUT.PUT_LINE prospective as indicated in (1&2), but I am having difficulty loading these values into a PL/SQL table from the package labeled as (3). I read your book and all but I do not see a solution to my problem
    All code compiles. (1&2) work together, (3) works by itself but will not populate the table, and I get no errors.
    1.The first being the one that retrieves the XML file and parses it.
    CREATE OR REPLACE procedure xml_main is
    P XMLPARSER.Parser;
    DOC CLOB;
    v_xmldoc xmldom.DOMDocument;
    v_out CLOB;
    BEGIN
    P := xmlparser.newParser;
    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>';
    --v_out := DOC;
    SYS.XMLPARSER.PARSECLOB ( P, DOC );
    v_xmldoc := SYS.XMLPARSER.getDocument(P);
    --DBMS_LOB.createtemporary(v_out,FALSE,DBMS_LOB.SESSION);
    --v_out := SYS.XMLPARSER.PARSECLOB ( P, DOC );
    --SYS.XMLDOM.writetoCLOB(v_xmldoc, v_out);
    --INSERT INTO TEST (TEST_COLUMN)
    --VALUES(V_OUT);
    --printElements(v_xmldoc);
    printElementAttributes(v_xmldoc);
    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, 'Wrong doc error');
    when xmldom.INVALID_CHARACTER_ERR then
    raise_application_error(-20120, 'Invalid Char error');
    when xmldom.NO_DATA_ALLOWED_ERR then
    raise_application_error(-20120, 'Nod data allowed error');
    when xmldom.NO_MODIFICATION_ALLOWED_ERR then
    raise_application_error(-20120, 'No mod 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 attr error');
    END;
    2. The second which displays the values from the .xml file I initialized above.
    CREATE OR REPLACE 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);
    text_value VARCHAR2(100):=NULL;
    n_child XMLDOM.DOMNODE;
    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);
    n_child:=xmldom.getFirstChild(n);
    text_value:=xmldom.getNodeValue(n_child);
    dbms_output.put_line('val='||text_value);
    IF (xmldom.isNull(nnm) = FALSE) THEN
    len2 := xmldom.getLength(nnm);
    dbms_output.put_line('length='||len2);
    -- 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;
    3. The package trying to insert into a PL/SQL table.
    CREATE OR REPLACE PACKAGE BODY XMLSTUD2 AS
    PROCEDURE STUDLOAD
    IS
    v_parser xmlparser.Parser;
    v_doc xmldom.DOMDocument;
    v_nl xmldom.DOMNodeList;
    v_n xmldom.DOMNode;
    DOC CLOB;
    v_out CLOB;
    n2 XMLDOM.DOMNODELIST;
    TYPE stuxml_type IS TABLE OF STUDENTS%ROWTYPE;
    s_tab stuxml_type := stuxml_type();
    --l_sturec students%rowtype;
    BEGIN
    -- Create a parser.
    v_parser := xmlparser.newParser;
    xmlparser.setValidationMode(v_parser, 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>';
    -- Parse the document and create a new DOM document.
    SYS.XMLPARSER.PARSECLOB ( v_parser, DOC );
    v_doc := SYS.XMLPARSER.getDocument(v_parser);
    -- Free resources associated with the Parser now it is no longer needed.
    xmlparser.freeParser(v_parser);
    -- Get a list of all the STUD nodes in the document using the XPATH syntax.
    v_nl := xslprocessor.selectNodes(xmldom.makeNode(v_doc),'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address');
    dbms_output.put_line( 'New Stud processed on '||to_char(sysdate, 'YYYY-MON-DD'));
    -- Loop through the list and create a new record in a tble collection
    -- for each STUD record.
    FOR stud IN 0 .. xmldom.getLength(v_nl) - 1 LOOP
    v_n := xmldom.item(v_nl, stud);
    s_tab.extend;
    -- Use XPATH syntax to assign values to he elements of the collection.
    --s_tab(s_tab.last).STUDENT_ID :=xslprocessor.valueOf(v_n,'StudentNumber');
    --s_tab(s_tab.last).SSN :=xslprocessor.valueOf(v_n,'ExternalIdNumber');
    --s_tab(s_tab.last).SHISID :=xslprocessor.valueOf(v_n,'StateIdNumber');
    s_tab(s_tab.last).STUDENT_LAST_NAME :=xslprocessor.valueOf(v_n,'LastName');
    --dbms_output.put_line( s_tab(s_tab.last).STUDENT_LAST_NAME);
    s_tab(s_tab.last).STUDENT_FIRST_NAME :=xslprocessor.valueOf(v_n,'FirstName');
    --s_tab(s_tab.last).STUDENT_MI :=xslprocessor.valueOf(v_n,'MiddleName');
    --s_tab(s_tab.last).STUDENT_GENDER :=xslprocessor.valueOf(v_n,'Gender');
    --s_tab(s_tab.last).SHISID :=xslprocessor.valueOf(v_n,'Month');
    --s_tab(s_tab.last).SHISID :=xslprocessor.valueOf(v_n,'Day');
    --s_tab(s_tab.last).SHISID :=xslprocessor.valueOf(v_n,'Year');
    --s_tab(s_tab.last).STUDENT_RACE :=xslprocessor.valueOf(v_n,'Race');
    --s_tab(s_tab.last).STUDENT_ETHNIC :=xslprocessor.valueOf(v_n,'Ethnicity');
    --s_tab(s_tab.last).STUDENT_PRI_LANG :=xslprocessor.valueOf(v_n,'PrimaryLanguage');
    --s_tab(s_tab.last).STUDENT_SEC_LANG :=xslprocessor.valueOf(v_n,'HouseholdLanguage');
    --s_tab(s_tab.last).STUDENT_STREET :=xslprocessor.valueOf(v_n,'Street');
    --s_tab(s_tab.last).STUDENT_APART_NO :=xslprocessor.valueOf(v_n,'ApartmentNumber');
    --s_tab(s_tab.last).STUDENT_COUNTY :=xslprocessor.valueOf(v_n,'City');
    --s_tab(s_tab.last).STUDENT_COUNTY :=xslprocessor.valueOf(v_n,'County');
    --s_tab(s_tab.last).STUDENT_STATE :=xslprocessor.valueOf(v_n,'State');
    --s_tab(s_tab.last).STUDENT_ZIP :=xslprocessor.valueOf(v_n,'ZipCode');
    END LOOP;
    FOR stud IN s_tab.first..s_tab.last LOOP
    dbms_output.put_line( s_tab(s_tab.last).STUDENT_LAST_NAME);
    INSERT INTO STUDENTS (
    SHISID, SSN, DOE_SCHOOL_NUMBER,
    PATIENT_TYPE, TEACHER, HOMEROOM,
    STUDENT_LAST_NAME, STUDENT_FIRST_NAME, STUDENT_MI,
    STUDENT_DOB, STUDENT_BIRTH_CERT, STUDENT_COMM,
    STUDENT_MUSA, STUDENT_FAMSIZE, STUDENT_FAMINCOME,
    STUDENT_UNINSURED, STUDENT_LUNCH, STUDENT_ZIP,
    STUDENT_STATE, STUDENT_COUNTY, STUDENT_STREET,
    STUDENT_APART_NO, STUDENT_PHONE, STUDENT_H2O_TYPE,
    STUDENT_WASTE_TRT, STUDENT_HOME_SET, STUDENT_NONHOME_SET,
    STUDENT_GENDER, STUDENT_RACE, STUDENT_ETHNIC,
    STUDENT_PRI_LANG, STUDENT_SEC_LANG, STUDENT_ATRISK,
    EMER_COND_MEMO, ASSIST_DEVICE_TYPE, SCHOOL_ENTER_AGE,
    STUDENT_CURR_GRADE, S504_ELIG_DATE, S504_DEV_DATE,
    S504_REV_DATE, STUDENT_504, STUDENT_IEP,
    IEP_EXP_DATE, GRAD_CLASS, TYPE_DIPLOMA,
    GRADE_RETAIN, LIT_PASS_TEST_MATH, LIT_PASS_DATE_MATH,
    LIT_PASS_TEST_WRITE, LIT_PASS_DATE_WRITE, LIT_PASS_TEST_READ,
    LIT_PASS_DATE_READ, SPEC_ED_ELIG, SPEC_ED_CODE,
    TRANSPORT_CODE, TRANSPORT_NO, PRIME_HANDICAP,
    PRIME_HANDICAP_PERCENT, PRIME_HANDI_MANAGER, FIRST_ADD_HANDI,
    FIRST_ADD_HANDICAP_PERCENT, FIRST_ADD_HANDI_504, FIRST_ADD_HANDI_504_DATE,
    SECOND_ADD_HANDI, SECOND_ADD_HANDICAP_PERCENT, MED_EXTERNAL_NAME,
    INS_TYPE, INS_PRI, INS_NAME,
    INS_MEDICAID_NO, ELIGDATE, INS_PRIV_INSURANCE,
    INS_APPR_BILL, INS_APPR_DATE, INS_PARENT_APPR,
    INS_POL_NAME, INS_POL_NO, INS_CARRIER_NO,
    INS_CARRIER_NAME, INS_CARRIER_RELATE, INS_AFFECT_DATE,
    INS_COPAY_OV, INS_COPAY_RX, INS_COPAY_AMBUL,
    INS_COPAY_EMER, INS_COPAY_OUTPAT, STUDENT_INACTIVE,
    PHYS_ID, ENCOUNTERNUM, USERID,
    MODDATE, STUDENT_ID, S504_DISABILITY,
    CHAPTER1, WELLNESS_ENROLL, SCHOOL_OF_RESIDENCE,
    INITIAL_IEP_DATE, CALENDAR_TRACK, USA_BORN,
    ALT_ID, FUTURE_SCHOOL, IEP_LAST_MEETING,
    IEP_LAST_SETTING, IEP_LAST_REFER_EVAL, THIRD_ADD_HANDI,
    LEP, GIFTED, IEP_EXIT_REASON,
    CASE_MANAGER_ID, INTAKE_NOTES, CALLER_PHONE,
    CALL_DATE, CALLER_RELATIONSHIP, CALLER_NAME,
    BUSINESS_PHONE, FAX, EMAIL,
    HIGHEST_EDUCATION, INTAKE_DATE, SERVICE_COORDINATOR,
    DISCHARGE_DATE, DISCHARGE_REASON, DISCHARGE_NOTES,
    INTAKE_BY, INTAKE_STATUS, IEP_LAST_SERVED_DATE,
    IEP_APC_DATE, IEP_EXIT_DATE, ADDRESS2,
    LEGAL_STATUS, RELIGION, EMPLOYMENT_STATUS,
    TARG_POP_GROUP1, TARG_POP_GROUP2, MARITAL_STATUS,
    THIRD_ADD_HANDI_PERCENT, LAST_INTERFACE_DATE, SERVICE_PLAN_TYPE,
    CURRENT_JURISDICTION, FIPS, BIRTH_PLACE_JURISDICTION,
    BIRTH_PLACE_HOSPITAL, BIRTH_PLACE_STATE, BIRTH_PLACE_COUNTRY,
    OTHER_CLIENT_NAME, SIBLINGS_WITH_SERVICES, PERM_SHARE_INFORMATION,
    PERM_VERIFY_INSURANCE, REFERRING_AGENCY, REFERRING_INDIVIDUAL,
    AUTOMATIC_ELIGIBILITY, INTAKE_IEP_ID, FUTURE_SCHOOL2,
    FUTURE_SCHOOL3, TRANSLATOR_NEEDED, TOTAL_CHILDREN_IN_HOME,
    REFERRED_BY, FAMILY_ID, SCREENING_CONSENT_FLAG,
    PICTURE_FILE, DUAL_ENROLLED, DOE_SCHOOL_NUMBER2)
    VALUES (123456789012, null,null ,
    null,null,null ,s_tab(stud).STUDENT_LAST_NAME
    , s_tab(stud).STUDENT_LAST_NAME,null ,
    null ,null ,null ,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null ,null , null,
    null, null,null );
    END LOOP;
    COMMIT;
    -- Free any resources associated with the document now it
    -- is no longer needed.
    xmldom.freeDocument(v_doc);
    END STUDLOAD;
    END XMLSTUD2;
    /

    Here's a first cut for you. Note that I've added some annotations to the XML Schema
    SQL>
    SQL>
    SQL> var schemaURL varchar2(256)
    SQL> var schemaPath varchar2(256)
    SQL> --
    SQL> begin
      2    :schemaURL := 'http://xmlns.welligent.com/xsd/Student.xsd';
      3    :schemaPath := '/public/Student.xsd';
      4  end;
      5  /
    PL/SQL procedure successfully completed.
    SQL> call dbms_xmlSchema.deleteSchema(:schemaURL,4)
      2  /
    Call completed.
    SQL> declare
      2    res boolean;
      3    xmlSchema xmlType := xmlType(
      4  '<xs:schema xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xs="http://www.w3.org/2001/XMLSchema">
      5     <xs:element name="Address" xdb:defaultTable="">
      6             <xs:complexType>
      7                     <xs:sequence>
      8                             <xs:element ref="Street"/>
      9                             <xs:element ref="ApartmentNumber"/>
    10                             <xs:element ref="City"/>
    11                             <xs:element ref="County"/>
    12                             <xs:element ref="State"/>
    13                             <xs:element ref="ZipCode"/>
    14                     </xs:sequence>
    15             </xs:complexType>
    16     </xs:element>
    17     <xs:element name="ApartmentNumber" xdb:defaultTable="">
    18             <xs:simpleType>
    19                     <xs:restriction base="xs:string">
    20                             <xs:enumeration value="12-D"/>
    21                     </xs:restriction>
    22             </xs:simpleType>
    23     </xs:element>
    24     <xs:element name="AuthUserId" xdb:defaultTable="">
    25             <xs:simpleType>
    26                     <xs:restriction base="xs:string">
    27                             <xs:enumeration value="Router"/>
    28                     </xs:restriction>
    29             </xs:simpleType>
    30     </xs:element>
    31     <xs:element name="Authentication" xdb:defaultTable="">
    32             <xs:complexType>
    33                     <xs:sequence>
    34                             <xs:element ref="AuthUserId"/>
    35                     </xs:sequence>
    36             </xs:complexType>
    37     </xs:element>
    38     <xs:element name="BasicStudent" xdb:defaultTable="">
    39             <xs:complexType>
    40                     <xs:sequence>
    41                             <xs:element ref="StudentNumber"/>
    42                             <xs:element ref="ExternalIdNumber"/>
    43                             <xs:element ref="StateIdNumber"/>
    44                             <xs:element ref="Name"/>
    45                             <xs:element ref="Gender"/>
    46                             <xs:element ref="BirthDate"/>
    47                             <xs:element ref="Race"/>
    48                             <xs:element ref="Ethnicity"/>
    49                             <xs:element ref="PrimaryLanguage"/>
    50                             <xs:element ref="HouseholdLanguage"/>
    51                             <xs:element ref="Address"/>
    52                     </xs:sequence>
    53                     <xs:attribute name="mealCode" type="xs:string" use="required"/>
    54                     <xs:attribute name="usBorn" use="required">
    55                             <xs:simpleType>
    56                                     <xs:restriction base="xs:string">
    57                                             <xs:enumeration value="Yes"/>
    58                                     </xs:restriction>
    59                             </xs:simpleType>
    60                     </xs:attribute>
    61                     <xs:attribute name="migrant" use="required">
    62                             <xs:simpleType>
    63                                     <xs:restriction base="xs:string">
    64                                             <xs:enumeration value="No"/>
    65                                     </xs:restriction>
    66                             </xs:simpleType>
    67                     </xs:attribute>
    68                     <xs:attribute name="workAbility" use="required">
    69                             <xs:simpleType>
    70                                     <xs:restriction base="xs:string">
    71                                             <xs:enumeration value="No"/>
    72                                     </xs:restriction>
    73                             </xs:simpleType>
    74                     </xs:attribute>
    75                     <xs:attribute name="ellStatus" type="xs:string" use="required"/>
    76             </xs:complexType>
    77     </xs:element>
    78     <xs:element name="BirthDate" xdb:defaultTable="">
    79             <xs:complexType>
    80                     <xs:sequence>
    81                             <xs:element ref="Month"/>
    82                             <xs:element ref="Day"/>
    83                             <xs:element ref="Year"/>
    84                     </xs:sequence>
    85             </xs:complexType>
    86     </xs:element>
    87     <xs:element name="City" xdb:defaultTable="">
    88             <xs:simpleType>
    89                     <xs:restriction base="xs:string">
    90                             <xs:enumeration value="Los Angeles"/>
    91                     </xs:restriction>
    92             </xs:simpleType>
    93     </xs:element>
    94     <xs:element name="ControlAreaSync" xdb:defaultTable="">
    95             <xs:complexType>
    96                     <xs:sequence>
    97                             <xs:element ref="Sender"/>
    98                             <xs:element ref="Datetime"/>
    99                     </xs:sequence>
    100                     <xs:attribute name="messageCategory" use="required">
    101                             <xs:simpleType>
    102                                     <xs:restriction base="xs:string">
    103                                             <xs:enumeration value="com.welligent.Student"/>
    104                                     </xs:restriction>
    105                             </xs:simpleType>
    106                     </xs:attribute>
    107                     <xs:attribute name="messageObject" use="required">
    108                             <xs:simpleType>
    109                                     <xs:restriction base="xs:string">
    110                                             <xs:enumeration value="BasicStudent"/>
    111                                     </xs:restriction>
    112                             </xs:simpleType>
    113                     </xs:attribute>
    114                     <xs:attribute name="messageAction" use="required">
    115                             <xs:simpleType>
    116                                     <xs:restriction base="xs:string">
    117                                             <xs:enumeration value="Create"/>
    118                                     </xs:restriction>
    119                             </xs:simpleType>
    120                     </xs:attribute>
    121                     <xs:attribute name="messageRelease" use="required">
    122                             <xs:simpleType>
    123                                     <xs:restriction base="xs:decimal">
    124                                             <xs:enumeration value="1.0"/>
    125                                     </xs:restriction>
    126                             </xs:simpleType>
    127                     </xs:attribute>
    128                     <xs:attribute name="messagePriority" use="required">
    129                             <xs:simpleType>
    130                                     <xs:restriction base="xs:byte">
    131                                             <xs:enumeration value="1"/>
    132                                     </xs:restriction>
    133                             </xs:simpleType>
    134                     </xs:attribute>
    135                     <xs:attribute name="messageType" use="required">
    136                             <xs:simpleType>
    137                                     <xs:restriction base="xs:string">
    138                                             <xs:enumeration value="Sync"/>
    139                                     </xs:restriction>
    140                             </xs:simpleType>
    141                     </xs:attribute>
    142             </xs:complexType>
    143     </xs:element>
    144     <xs:element name="County" xdb:defaultTable="">
    145             <xs:simpleType>
    146                     <xs:restriction base="xs:string">
    147                             <xs:enumeration value="Los Angeles"/>
    148                     </xs:restriction>
    149             </xs:simpleType>
    150     </xs:element>
    151     <xs:element name="DataArea" xdb:defaultTable="">
    152             <xs:complexType>
    153                     <xs:sequence>
    154                             <xs:element ref="NewData"/>
    155                     </xs:sequence>
    156             </xs:complexType>
    157     </xs:element>
    158     <xs:element name="Datetime">
    159             <xs:complexType>
    160                     <xs:sequence>
    161                             <xs:element ref="Year"/>
    162                             <xs:element ref="Month"/>
    163                             <xs:element ref="Day"/>
    164                             <xs:element ref="Hour"/>
    165                             <xs:element ref="Minute"/>
    166                             <xs:element ref="Second"/>
    167                             <xs:element ref="SubSecond"/>
    168                             <xs:element ref="Timezone"/>
    169                     </xs:sequence>
    170             </xs:complexType>
    171     </xs:element>
    172     <xs:element name="Day" xdb:defaultTable="">
    173             <xs:simpleType>
    174                     <xs:restriction base="xs:byte">
    175                             <xs:enumeration value="1"/>
    176                             <xs:enumeration value="23"/>
    177                     </xs:restriction>
    178             </xs:simpleType>
    179     </xs:element>
    180     <xs:element name="Ethnicity" xdb:defaultTable="">
    181             <xs:simpleType>
    182                     <xs:restriction base="xs:string">
    183                             <xs:enumeration value="Hispanic"/>
    184                     </xs:restriction>
    185             </xs:simpleType>
    186     </xs:element>
    187     <xs:element name="ExternalIdNumber" xdb:defaultTable="">
    188             <xs:simpleType>
    189                     <xs:restriction base="xs:int">
    190                             <xs:enumeration value="1234567890"/>
    191                     </xs:restriction>
    192             </xs:simpleType>
    193     </xs:element>
    194     <xs:element name="FirstName" xdb:defaultTable="">
    195             <xs:simpleType>
    196                     <xs:restriction base="xs:string">
    197                             <xs:enumeration value="Maria"/>
    198                     </xs:restriction>
    199             </xs:simpleType>
    200     </xs:element>
    201     <xs:element name="Gender" xdb:defaultTable="">
    202             <xs:simpleType>
    203                     <xs:restriction base="xs:string">
    204                             <xs:enumeration value="Female"/>
    205                     </xs:restriction>
    206             </xs:simpleType>
    207     </xs:element>
    208     <xs:element name="Hour" xdb:defaultTable="">
    209             <xs:simpleType>
    210                     <xs:restriction base="xs:byte">
    211                             <xs:enumeration value="13"/>
    212                     </xs:restriction>
    213             </xs:simpleType>
    214     </xs:element>
    215     <xs:element name="HouseholdLanguage" xdb:defaultTable="">
    216             <xs:simpleType>
    217                     <xs:restriction base="xs:string">
    218                             <xs:enumeration value="Spanish"/>
    219                     </xs:restriction>
    220             </xs:simpleType>
    221     </xs:element>
    222     <xs:element name="LastName" xdb:defaultTable="">
    223             <xs:simpleType>
    224                     <xs:restriction base="xs:string">
    225                             <xs:enumeration value="Lopez"/>
    226                     </xs:restriction>
    227             </xs:simpleType>
    228     </xs:element>
    229     <xs:element name="MessageId" xdb:defaultTable="">
    230             <xs:complexType>
    231                     <xs:sequence>
    232                             <xs:element ref="SenderAppId"/>
    233                             <xs:element ref="ProducerId"/>
    234                             <xs:element ref="MessageSeq"/>
    235                     </xs:sequence>
    236             </xs:complexType>
    237     </xs:element>
    238     <xs:element name="MessageSeq" xdb:defaultTable="">
    239             <xs:simpleType>
    240                     <xs:restriction base="xs:byte">
    241                             <xs:enumeration value="53"/>
    242                     </xs:restriction>
    243             </xs:simpleType>
    244     </xs:element>
    245     <xs:element name="MiddleName" xdb:defaultTable="">
    246             <xs:simpleType>
    247                     <xs:restriction base="xs:string">
    248                             <xs:enumeration value="S"/>
    249                     </xs:restriction>
    250             </xs:simpleType>
    251     </xs:element>
    252     <xs:element name="Minute" xdb:defaultTable="">
    253             <xs:simpleType>
    254                     <xs:restriction base="xs:byte">
    255                             <xs:enumeration value="47"/>
    256                     </xs:restriction>
    257             </xs:simpleType>
    258     </xs:element>
    259     <xs:element name="Month" xdb:defaultTable="">
    260             <xs:simpleType>
    261                     <xs:restriction base="xs:byte">
    262                             <xs:enumeration value="1"/>
    263                             <xs:enumeration value="3"/>
    264                     </xs:restriction>
    265             </xs:simpleType>
    266     </xs:element>
    267     <xs:element name="Name" xdb:defaultTable="">
    268             <xs:complexType>
    269                     <xs:sequence>
    270                             <xs:element ref="LastName"/>
    271                             <xs:element ref="FirstName"/>
    272                             <xs:element ref="MiddleName"/>
    273                     </xs:sequence>
    274             </xs:complexType>
    275     </xs:element>
    276     <xs:element name="NewData" xdb:defaultTable="">
    277             <xs:complexType>
    278                     <xs:sequence>
    279                             <xs:element ref="BasicStudent"/>
    280                     </xs:sequence>
    281             </xs:complexType>
    282     </xs:element>
    283     <xs:element name="PrimaryLanguage" xdb:defaultTable="">
    284             <xs:simpleType>
    285                     <xs:restriction base="xs:string">
    286                             <xs:enumeration value="English"/>
    287                     </xs:restriction>
    288             </xs:simpleType>
    289     </xs:element>
    290     <xs:element name="ProducerId" xdb:defaultTable="">
    291             <xs:simpleType>
    292                     <xs:restriction base="xs:string">
    293                             <xs:enumeration value="a72af712-90ea-43be-b958-077a87a29bfb"/>
    294                     </xs:restriction>
    295             </xs:simpleType>
    296     </xs:element>
    297     <xs:element name="Race" xdb:defaultTable="">
    298             <xs:simpleType>
    299                     <xs:restriction base="xs:string">
    300                             <xs:enumeration value="Hispanic"/>
    301                     </xs:restriction>
    302             </xs:simpleType>
    303     </xs:element>
    304     <xs:element name="Second" xdb:defaultTable="">
    305             <xs:simpleType>
    306                     <xs:restriction base="xs:byte">
    307                             <xs:enumeration value="30"/>
    308                     </xs:restriction>
    309             </xs:simpleType>
    310     </xs:element>
    311     <xs:element name="Sender" xdb:defaultTable="">
    312             <xs:complexType>
    313                     <xs:sequence>
    314                             <xs:element ref="MessageId"/>
    315                             <xs:element ref="Authentication"/>
    316                     </xs:sequence>
    317             </xs:complexType>
    318     </xs:element>
    319     <xs:element name="SenderAppId" xdb:defaultTable="">
    320             <xs:simpleType>
    321                     <xs:restriction base="xs:string">
    322                             <xs:enumeration value="com.openii.SyncRouter"/>
    323                     </xs:restriction>
    324             </xs:simpleType>
    325     </xs:element>
    326     <xs:element name="State" xdb:defaultTable="">
    327             <xs:simpleType>
    328                     <xs:restriction base="xs:string">
    329                             <xs:enumeration value="CA"/>
    330                     </xs:restriction>
    331             </xs:simpleType>
    332     </xs:element>
    333     <xs:element name="StateIdNumber" xdb:defaultTable="">
    334             <xs:simpleType>
    335                     <xs:restriction base="xs:int">
    336                             <xs:enumeration value="123456"/>
    337                     </xs:restriction>
    338             </xs:simpleType>
    339     </xs:element>
    340     <xs:element name="Street" xdb:defaultTable="">
    341             <xs:simpleType>
    342                     <xs:restriction base="xs:string">
    343                             <xs:enumeration value="123 Any Street"/>
    344                     </xs:restriction>
    345             </xs:simpleType>
    346     </xs:element>
    347     <xs:element name="StudentNumber" xdb:defaultTable="">
    348             <xs:simpleType>
    349                     <xs:restriction base="xs:hexBinary">
    350                             <xs:enumeration value="052589F201"/>
    351                     </xs:restriction>
    352             </xs:simpleType>
    353     </xs:element>
    354     <xs:element name="SubSecond" xdb:defaultTable="">
    355             <xs:simpleType>
    356                     <xs:restriction base="xs:short">
    357                             <xs:enumeration value="223"/>
    358                     </xs:restriction>
    359             </xs:simpleType>
    360     </xs:element>
    361     <xs:element name="Timezone" xdb:defaultTable="">
    362             <xs:simpleType>
    363                     <xs:restriction base="xs:string">
    364                             <xs:enumeration value="6:00-GMT"/>
    365                     </xs:restriction>
    366             </xs:simpleType>
    367     </xs:element>
    368     <xs:element name="Year" xdb:defaultTable="">
    369             <xs:simpleType>
    370                     <xs:restriction base="xs:short">
    371                             <xs:enumeration value="1995"/>
    372                             <xs:enumeration value="2001"/>
    373                     </xs:restriction>
    374             </xs:simpleType>
    375     </xs:element>
    376     <xs:element name="ZipCode" xdb:defaultTable="">
    377             <xs:simpleType>
    378                     <xs:restriction base="xs:int">
    379                             <xs:enumeration value="90071"/>
    380                     </xs:restriction>
    381             </xs:simpleType>
    382     </xs:element>
    383     <xs:element name="com.welligent.Student.BasicStudent.Create" xdb:defaultTable="STUDENT_TABLE">
    384             <xs:complexType>
    385                     <xs:sequence>
    386                             <xs:element ref="ControlAreaSync"/>
    387                             <xs:element ref="DataArea"/>
    388                     </xs:sequence>
    389             </xs:complexType>
    390     </xs:element>
    391  </xs:schema>');
    392  begin
    393    if (dbms_xdb.existsResource(:schemaPath)) then
    394      dbms_xdb.deleteResource(:schemaPath);
    395    end if;
    396    res := dbms_xdb.createResource(:schemaPath,xmlSchema);
    397  end;
    398  /
    PL/SQL procedure successfully completed.
    SQL> begin
      2    dbms_xmlschema.registerSchema
      3    (
      4      :schemaURL,
      5      xdbURIType(:schemaPath).getClob(),
      6      TRUE,TRUE,FALSE,TRUE
      7    );
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL> insert into STUDENT_TABLE values (xmltype(
      2  '<com.welligent.Student.BasicStudent.Create>
      3     <ControlAreaSync messageCategory="com.welligent.Student" messageObject="BasicStudent" messageAction="Create" messageRelease="1.0" me
    ssagePriority="1" messageType="Sync">
      4             <Sender>
      5                     <MessageId>
      6                             <SenderAppId>com.openii.SyncRouter</SenderAppId>
      7                             <ProducerId>a72af712-90ea-43be-b958-077a87a29bfb</ProducerId>
      8                             <MessageSeq>53</MessageSeq>
      9                     </MessageId>
    10                     <Authentication>
    11                             <AuthUserId>Router</AuthUserId>
    12                     </Authentication>
    13             </Sender>
    14             <Datetime>
    15                     <Year>2001</Year>
    16                     <Month>3</Month>
    17                     <Day>23</Day>
    18                     <Hour>13</Hour>
    19                     <Minute>47</Minute>
    20                     <Second>30</Second>
    21                     <SubSecond>223</SubSecond>
    22                     <Timezone>6:00-GMT</Timezone>
    23             </Datetime>
    24     </ControlAreaSync>
    25     <DataArea>
    26             <NewData>
    27                     <BasicStudent mealCode="" usBorn="Yes" migrant="No" workAbility="No" ellStatus="">
    28                             <StudentNumber>052589F201</StudentNumber>
    29                             <ExternalIdNumber>1234567890</ExternalIdNumber>
    30                             <StateIdNumber>123456</StateIdNumber>
    31                             <Name>
    32                                     <LastName>Lopez</LastName>
    33                                     <FirstName>Maria</FirstName>
    34                                     <MiddleName>S</MiddleName>
    35                             </Name>
    36                             <Gender>Female</Gender>
    37                             <BirthDate>
    38                                     <Month>1</Month>
    39                                     <Day>1</Day>
    40                                     <Year>1995</Year>
    41                             </BirthDate>
    42                             <Race>Hispanic</Race>
    43                             <Ethnicity>Hispanic</Ethnicity>
    44                             <PrimaryLanguage>English</PrimaryLanguage>
    45                             <HouseholdLanguage>Spanish</HouseholdLanguage>
    46                             <Address>
    47                                     <Street>123 Any Street</Street>
    48                                     <ApartmentNumber>12-D</ApartmentNumber>
    49                                     <City>Los Angeles</City>
    50                                     <County>Los Angeles</County>
    51                                     <State>CA</State>
    52                                     <ZipCode>90071</ZipCode>
    53                             </Address>
    54                     </BasicStudent>
    55             </NewData>
    56     </DataArea>
    57  </com.welligent.Student.BasicStudent.Create>'))
    58  /
    1 row created.
    SQL>
    SQL>
    SQL>

Maybe you are looking for

  • From PHP to JSP for a search-responder.php

    I have been asked to use the "search-as-you-type" solution offered up by Google at [http://code.google.com/p/search-as-you-type/|http://code.google.com/p/search-as-you-type/]. The documentation offered by Google is pretty much straight forward but of

  • Partial Page Redering in ADF

    Hi, How to implement partial Page Redering in ADF

  • R2 to R3 upgrade Schedule Date Format Changed

    We recently did an upgrade from BOXI r2 to R3. We did the installation wizard using the r3 image to the same server. What we have noticed now is that all the schedule dates in the CMC for our reports have changed format from US to EURO. 01/13/08 to 1

  • Dynamic Link Not Working

    To anyone that can help.. I am having several issues with adobe at the moment and really need some advice. i have tried adobe themselves, they struggled to help too, but that was mainly down to language issues. I have a Canon XHA1S camera with an ext

  • Acrobat 8 Professional - Autocad - Adobe PDF options

    I have Windows XP Pro 2002 SP2, Autocad 2008 and Acrobat 8 Professional Trial version. when I am in Autocad and do a print to adobe pdf, I am always prompted for the filename and folder where the pdf file will be saved. the filename which is proposed