Document contains too many nodes error when extracting xml tag name

I Have a large xml file in which the tag contains ~: as the value.
Now I am trying to extract all the tags which have ~: as the value and store that column using the following query and insert into a table.
insert into space_md select distinct xmltype(extract(value(x), '/').getstringval()).getrootelement() COLUMN_NAME
from gt_xmltype_tab gt, TABLE(XMLSequence(extract(gt.xmlfile1, '/ROWSET/ROW/*'))) x
where instr(extract(value(x),'/').getstringval(),'~:') > 1;
The xml file was generated using dbms_xmlgen.getxml. Table has 48 columns and around 4000 rows.
My above insert query gave me an error of 31186 too many nodes error.
I am using oracle version 10.2.0.3.
Following are the set of commands I ran....
SQL> insert into gt_xmltype_tab(xmlfile1)
values(XMLType(bfilename('BKUP_RES','QC.xml'),nls_charset_id('AL32UTF8'))); 2
1 row created.
SQL> SQL>
SQL> insert into restore_space_metadata select distinct 'QC', xmltype(extract(value(x), '/').getstringval()).getrootelement() COLUMN_NAME
2 from gt_xmltype_tab gt, TABLE(XMLSequence(extract(gt.xmlfile1, '/ROWSET/ROW/*'))) x
3 where instr(extract(value(x),'/').getstringval(),'~:') > 1;
insert into restore_space_metadata select distinct 'QC', xmltype(extract(value(x), '/').getstringval()).getrootelement() COLUMN_NAME
ERROR at line 1:
ORA-31186: Document contains too many nodes
Is there a better way of extracting the xml tag element name based on the xmltag content?
There is one other table which has 172 columns but only 100 rows so it doesnt create any problem on that table.
But this QC table has less columns but many many rows...
Any suggestions

There is a requiremnent of taking centain type of data backup and restore it.
It was implemented on flat file approach which was giving errors.
So it was implemented using XML approach.
Read data, store in xml file and read from xml file and load it into table.
Further, found that dbms_xmlstore is not able to handle tag only with whitespace
and tried to use the loading xml file into xmltype table column and extract data.
XMLTYPE column also has same problem of ignoring whitespace when used with extractvalue functions.
So for the workaround I update xmlfile having only one more more whitespace in the tag to have ~: character once.
After restoring data from xml to table I would run update qeury to update ~: to " ".
Now instead of running blind update for all the tables and all the columns from ~: to " " I thouhgt whyy not create a xml file of tag having ~:
along with its tablename.
and thats where I found the problem of too many nodes...
THe insert query you saw is populating table for table_name and column_name with tag having only ~: in it.
I hope this gives you the fair idea of stuff I am doing.

Similar Messages

  • ORA-31186: Document contains too many nodes

    Hi all,
    DB version:
    BANNER                                                        
    Oracle Database 10g Enterprise Edition Release 10.1.0.5.0 - 64bi
    PL/SQL Release 10.1.0.5.0 - Production                          
    CORE     10.1.0.5.0     Production                                        
    TNS for HPUX: Version 10.1.0.5.0 - Production                   
    NLSRTL Version 10.1.0.5.0 - Production i am getting the "ORA-31186: Document contains too many nodes" error when listitem nodes come more then 70,000.
    my  code like below.
      l_xmldoc := '<listitems>
      <listitem><homePhone>6666446666</homePhone><mobile>9988776655</mobile><emailaddr><![CDATA[[email protected]]]></emailaddr><deviceid>1</deviceid></listitem>
      <listitem><homePhone>6666446666</homePhone><mobile>9988776656</mobile><emailaddr><![CDATA[[email protected]]]></emailaddr><deviceid>1</deviceid></listitem>
      <listitem><homePhone>6666446666</homePhone><mobile>9988776657</mobile><emailaddr><![CDATA[[email protected]]]></emailaddr><deviceid>1</deviceid></listitem> 
    </listitems>';
    SELECT EXTRACT(l_xmldoc,'/listitems/listitem')   into l_xmldoc FROM DUAL;--error raising here
      SELECT EXTRACTVALUE( VALUE(t),'/listitem/emailaddr')
                 ,EXTRACTVALUE( VALUE(t),'/listitem/mobile')
                 ,EXTRACTVALUE( VALUE(t),'/listitem/homephone')
                 ,EXTRACTVALUE( VALUE(t),'/listitem/deviceid')
    BULK COLLECTION INTO t_table
      FROM TABLE(XMLSEQUENCE(l_xmldoc)) t;Please help me to understand why this error occurs and how to resolve.
    Thanks,
    Ram

    >
    You can find a little bit extra info in the search errors section on OTN regarding doc's 10gR2:
    * ORA-31186: Document contains too many nodes
    Cause: Unable to load the document because it has exceeded the maximum allocated number of DOM nodes.
    Action: Reduces the size of the document.
    >
    Check this discussion -- ORA-24817 and ORA-31186 (undocumented errors)
    Somebody suggested - Increasing the shared_pool_size and the java_pool_size will fix this.
    Please check,
    Edited by: ranit B on Nov 27, 2012 4:37 PM

  • ORA-31186 Document contains too many nodes - Using XMLGen with XSLT

    When processing a query that returns a large number of rows I'm getting this error. It doesn't appear that processing results with a style sheet works for larger result sets, in this case 64k rows.

    Hi,
    you may want to check
    ORA-24817 and ORA-31186 (undocumented errors)
    Regards,
    Jaromir

  • Too many files open when parsing xml

    HI,
    I have an application which needs to parse about 13 XML files multiple times.After parsing the XML and creating a DOM I put in values to create an XML message which is then put onto a message queue.I am getting a 'Too many files open' problem.I have run the loop a maximum of 105 times after which i get the problem.However I will need to do this atleast more than 10000 times.Can someone suggest a solution to read the XML, create a DOM and populate the DOM without encountering the above mentioned problem.If I just parse the XML and store the 13 DOMs in a HashMap and use the same, the text values from the previous call get appended resulting in an invalid XML.To overcome this we parse the XML each time a message is to be sent.We also tried increasing the system memory as suggested at some sites but the solution was of no help.
    Thanks & Regards

    Don't know what this has to do with Web Start but you should make sure that, after parsing a file, the corresponding InputStream is properly closed.

  • How to extract xml tag name contains dashes

     
    Hi, How to parse XML file to extract root tag contains dashes in Flex,for example
    XML Input is: <regular-body>Text of my post...</regular-body>
    expected output is : regular-body
    I appreciate any of your suggestions or inputs

    Do you want to get the name of the XML ELEMENT regular-body, or the value in the XML file "Text of my post...".
    If its the latter, then you could use the bracket/quote notation for extracting the value, like in the following example:
    image = xmlWeather[0]..parameters["conditions-icon"]["icon-link"][idx]
    I use this when parsing weather information from a 3rd party in which their XML is loaded with dashes.
    If you are looking to get the actual element name, not sure how to do that.  I would think that if you are using an XML file, you would have at least the high level element known.

  • PL/SQL: numeric or value error when extracting xml file from tables.

    create or replace FUNCTION proc_generate_xml_from_tables(p_directory in varchar2,
    p_areaname in varchar2)
    return integer
    AS
    qryCtx DBMS_XMLGEN.ctxHandle;
    result CLOB;
    clob_len number := 0;
    file_ptr utl_file.file_type;
    oTableName restore_metadata.table_name%type;
    o_filename restore_metadata.table_name%type;
    cursor metadata_restore_list(p_area varchar2) is
    select * from restore_metadata
    where instr(area_name,upper(p_Area)) > 0
    order by degree;
    vtabcount number := 0;
    sql_stmt varchar2(300);
    BEGIN
    dbms_lob.createtemporary(result, true,dbms_lob.session);
    oTableName := upper('MAINT_ACTVS');
    vtabcount := 0;
    sql_stmt := 'select count(*) from ' || oTableName;
    execute immediate sql_stmt into vtabcount;
    o_filename := oTableName || '.xml';
    file_ptr := utl_file.fopen(p_directory,o_filename,'W');
    dbms_output.put_line(oTableName);
    qryCtx := dbms_xmlgen.newcontext('select * from ' || oTableName);
    result := dbms_xmlgen.getxml(qryCtx);
    --dbms_output.put_line(result);
    clob_len := dbms_lob.getlength(result);
    dbms_output.put_line('Length of the clob file' || clob_len);
    utl_file.put_line(file_ptr,result);
    utl_file.fclose(file_ptr);
    dbms_xmlgen.closeContext(qryCtx);
    dbms_lob.freetemporary(result);
    return 0;
    EXCEPTION
    when others THEN
    utl_file.fclose(file_ptr);
    dbms_output.put_line('Table Name into Consideration :- ' || oTableName);
    dbms_output.put_line('Oracle Error Number:- ' || sqlcode || ' Ora Message :- ' || sqlerrm);
    return -1;
    END;
    I am getting the following errors..
    SQL> @temp1.sql
    MAINT_ACTVS
    Length of the clob file34245
    Table Name into Consideration :- MAINT_ACTVS
    Oracle Error Number:- -6502 Ora Message :- ORA-06502: PL/SQL: numeric or value error
    What am I doing wrong here?
    DB version is Oracle 10g
    Edited by: userAtoZ on May 6, 2011 2:55 PM

    >
    My problem lies that my xml file is having data more than 32 K.
    When I write it 32K at a time then it work fine.
    >
    Then break it down.
    l_pos number;
    WHILE (l_pos <= clob_len)
      LOOP
        UTL_FILE.PUT_LINE (file_ptr,DBMS_LOB.SUBSTR ( RESULT , 32767,l_pos));
        l_pos := l_pos + 32767;
      END LOOP;
    utl_file.fclose(file_ptr);
     

  • Error MDX result contains too many cells (more than 1 million). (WIS 10901)

    Hi,
    We have developed an universe on BI query and developed report on it. But while running this BO query in Web Intelligence we get the following error
    A database error occured. The database error text is: Error in MDDataSetBW.GetCellData.  MDX result contains too many cells (more than 1 million). (WIS 10901)
    This BO query is restricted for one document number.
    Now when i check in the BI cube there are not more than 300-400 records for that document number.
    If i restrict the BO query for document number, delivery number, material and acknowledged date then the query runs successfully.
    Can anyone please help with this issue.

    follow this article to get the mdx generated by the webi report.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/90b02218-d909-2e10-1988-a2ca74547900
    then try to execute the same in mdxtest transaction in bw

  • While importing clip getting error "The file contains too many audio channels" in premiere pro cs5

    Hey,
    I  am using video clips from sony digital hi8 camera and trying to import  video clips (.mov) 720*480  fps 29.97 .But unable to get into premiere  pro cs5.System configuration:
    MAC 10.6.4
    2.66ghz intel core i7
    4gb ram
    nvidia geforce gt 330 mn.
    Error :
    Actually ,i have checked the inspector panel and i found same infomation in
    in this panel for both clips .please check these clips screen shoots seprately .
    Actually i have a long video clip and i have scatterred this clip into 6 diffrent portions
    where i am not able to import the last video clip.It is giving me same error "file contain too many audio channels"".
    Regards
    Manoj

    I too am getting this error in Premiere CS5.  I was digitizing a Broadcast VHS and since I did not have a breakout box, I hooked it up to a Sony DV deck so I could connect via firewire and capture inside Premiere.  I was able to capture and import 1 of the 3 clips and it did have 4 audio channels attached to it.  However, upon closer inspection only 2 channels had a waveform.  I captured the other 2 clips the same way, but this time, Premiere give the error "The file contains too many audio channels." 
    Any ideas?

  • Script error - Output is continuous or contain too many pages and get

    Hi ,
    I have added one more page (name affidvt ) to the existing script.
    Previously
    Cover page was calling next page as cover
    first    page was calling next page as next
    next   page as again next.
    But after new addition of the page ( called as affidvt) it is now
    Cover page was calling next page as cover
    first    page was calling next page as next
    next   page as affidvt.
    When I test run this script it gives -
    Output is continuous or contain too many pages and get
    terminated.
    Any solution ?

    Check the page assignments again. Looks like at least 2 pages are calling each other.
    -Cheers

  • Sapscript: Output is continuous or contains too many pages (more than 3)

    Hi,
    I have developed Sapscript form for printing out material documents.
    When users try to print out document with 68 positions, they receive error in MB90 -
    " Output is continuous or contains too many pages (>3)".
    Message no. TD405
    If they try to print out small document, for example 3 positions, everything is ok.
    What I have to check now?
    Thanks,
    Sveta.
    Edited by: Julius Bussche on Sep 24, 2008 10:24 AM

    Hi,
        Try to check the page counters for each page format.
        How many Page formats are there in your Form?
    Check the First Page Attributes,
    Page Counter
    Mode                     START
    Numbering Type     ARABIC
        Output length     00
    which is next page to First page
    Check Next Page Attributes
    Page counter
    Mode                     INC
    Numbering Type     ARABIC
    Output length         00
    which is next page to Next page
    Regards
    Bala Krishna

  • MDX result contains too many cells - NUMC 6

    Hi to all.
    I'm using I bex query in order to retrieve the field to my universe.
    I know that when there is an element defined as NUMC (6), some errors may occurs into the MDX extraction (e.g.  MDX result contains too many cells (more than 1 million)).
    Can I set everythink in my BEX query or in my universe definition in order to not change the caratcteristic in my SAP BW system ?
    Indeed I will have some bureaucratic and formal problem to change the sap bw type definition of the caracteristics.
    Thank'you in advance.

    hi Ingo,
    Are you sure ? Indeed when I try to run a query where I have a NUMC6 filed and another field there is the error attached above.
    Instead when I run the same query without the NUMC6 field the query  ends correctly.
    Moreover I see in the "SAP Note 1378064" where I see in the "Reason and Prerequisites": The internal data types are incorrect due to NUMC(6). The conversion to integer is required.
    But I don't know if this conversion is allowed in the Bex Query step or in the universe filed definition.
    Any advice will be accepted !

  • How do I open a library book on a recently acquired Samsung Nook?  I get "too many activations" error. I have an active adobe digital editions and my other devices work fine.  Custumer Support was unable to get the new device activated.

    I have a library book on the bookshelf of a newly acquired Samsung Nook but I cannot open it.  My other devices work fine but I cannot activate the new unit.  I get a "too many activations" error message.  Customer Services say I have a valid license but they deemed my problem to be a technical issue and referred me to the forum.  Thanks

    Step 1 - by trial and error...
    So far, I have been able to create physical files containing MP3 and JPG on the NAS using the Windows XP systems to copy from shared locations on the Vista and Win7 boxes.  This process has been aided by the use of a 600 GB SATA 2 capable hard drive enclosure.  I first attach to Win 7 or Win Vista and reboot to see the local drive spaces formatted on the portable device.  Then I copy files from the user's private directories to the public drive space.  When the portable drive is wired to an XP box, I can use Windows to move the files from the portable device to the NAS without any of the more advanced file attributes being copied to the NAS.  Once the files are on the NAS, I can add the new folder(s) to iTunes on any of the computers and voila, the data becomes sharable via iTunes.  So far, this works for anything that I have completely purchased, or for MP3's I made from the AIC files created when I purchased alblums via iTunes. 
    I have three huge boxes full of vynl records I've accumulated.  The ones that I've successfully digitized via a turntable attached to the sound card on one of my computers and third party software, have found their way to the NAS after being imported into iTunes and using it to bring down available album art work.  In general I've been reasonably well pleased with the sound quality of digital MP3 files created this way, but the software I've been using sometimes has serious problems automatically separating individual songs from the album tracks and re-converting "one at a time" isn't very efficient.

  • There are too many TREX Errors

    Hello Experts,
    I have created an Index for a specific folder in KM.
    Under KM--> Sys Conf --> KM --> Index Administration it shows the green led, which I believe that the data sources are completely indexed. But, under the KM--> Monitoring > KM> Indexing Monitor , it says:
    Status = red led (There are too many TREX errors)
    Status = Active
    In Process = 142678
    Indexed = 51345
    Errors = 10849
    And, when I opened the list of errors there are many Crawler and Trex: Preparation failed: index operation
    Can you suggest, what's the mistake that I am doing or do I have to any additional configurations for the index that I have created??
    Thanks,
    Raghava

    Hi Raghava,
    as I said, "Preparation Failed" may be (if I recall correctly) as early as the HTTP request to even get the document for indexing. If this is not possible for TREX, then of course the indexing fails.
    What I suggested was a manual reproduction. So log on to the TREX host (preferrably with the user that TREX uses to access the documents) and then simply try to open one of the docs with the "failed" status by pasting its address in the browser. If this does not work, you have a pretty good idea what's happening.
    Unfortunately, if that were the case, this would the be some issue in network communications or ticketing and authorizatuions, which I can not tell you from here how to solve.
    In any case, I would advise to open a support message to SAP - probably rather under the portal component than under TREX, as I do not assume that this stage of a queue error has anything to do with the actual engine.
    Best,
    Karsten

  • MDX result contains too many cells - But relese note applied!!!!!!

    Hi experts!
    When I create a query with my infoview, it retrive me the following error:
    <ERROR COMPONENT="WIS" ERRORCODE="10901" ERRORTYPE="USER" MESSAGE="Si è verificato un errore del database. Il testo dell&apos;errore del database è: Errore in MDDataSetBW.GetCellData.  MDX result contains too many cells (more than 1 million). (WIS 10901)" PREFIX="ERR">
    I try to understand if there are some problems about the sap.notes. In particular I ask to the technical people if the following note had installed into my system:
    Note 931479 - MDX: More than 1,000,000 instances per axis
    The technical people said me that this note had been installed because the system is to level 23.
    bold
    Then what problem may be due the fact that my mdx is not able to contains more than 1 million of cell ?
    bold
    thank'you in advance !

    Hi,
    whats the release of the SAP BW System - including patch level ?
    whats the release of the SAP BusinessObjects system including patch level ?
    Ingo

  • Result set does not fit; it contains too many rows

    Dear All,
    We are in BI7 and running reports on Excel 2007. Even though number of rows limitation in Excel 2007 is more than  1Million, when I try to execute a report with more than 65k records of output, system is generating output only for 65k rows with message "Result set does not fit; it contains too many rows".
    Our Patch levels:
    GUI - 7.10
    Patch level is 11
    Is there any way to generate more than 65000 rows in Bex?
    Thanks in advance...
    regards,
    Raju
    Dear Gurus,
    Could you please shed some light on this issue?
    thanks and regards,
    Raju
    Edited by: VaraPrasadraju Potturi on Apr 14, 2009 3:13 AM

    Vara Prasad,
    This has been discussed on the forums - for reasons of backward compatibility I do not think BEx supports more that 65000 rows .... I am still not sure about the same since I have not tried out a query with more that 65K rows on excel 2007 but I think this is not possible...

Maybe you are looking for

  • How do I force Pages to open a document at the END of the document?

    I have a document -- my personal diary -- in which I write almost every day. Every time I open it, it opens about 3/4 of the way into the document, then I have to go to the end of the document to write more. Is there any way to change this weird beha

  • Send audit information to  mail acount using fined-grained auditing

    hi. i like to send audit information to particular mail account. but i have failed. is any one can help me. i have writtten step by step what i have done for my work. my mail server work properly. SQL> CONNECT SYS/PAS AS SYSDBA after that i have crea

  • Quad Processor in MacBook Pro?

    Is there any sign that the Quad processors that come in the new MacPro's will be in the MacBook Pro's anytime soon?

  • Are ServerSocketFactory backlog settings ignored on Fedora 8

    Hi all, Is there someone out there who met problems on setting backlog size of a server socket? In an application of mine I use the instructions ServerSocketFactory myServerSocketFactory = (ServerSocketFactory)ServerSocketFactory.getDefault(); myList

  • Digital SLRs and linux

    Hi all- I'm about to get a canon eos 400d (rebel xti in us) and want to ask some questions.... I read that this camera does not operate as mass storage device, so am I right to think that only way to transfer files is to use gphoto? second, I want to