Maximum file handled using dom4j

Hi,
Wanna know whats the maximum xml file size that can be handled using dom4j.
To be precise, I have a 1gb xml file that I wanna parse, I have implemented it using SAX, but wanna know if dom4j can be used?
Regards,
R

Just try, you'll probably only be limited by available memory. I assume that building any kind of DOM tree of the document (be it org.w3c.dom or dom4j) will use more memory than the original file. So you'll need > 1 GB of memory for your file. If you have to handle files that big and don't absolutely need it all at the same time then SAX is probably the better solution as it doesn't require the whole file to be in memory at a time.

Similar Messages

  • Maximum file size using htmlb:fileUpload

    Hello Gurus,
    in a bsp application we are using htmlb:fileUpload. It was possible to upload a 43 MB file without problem. But our maximum file size is about 220 MB. We made a test with a 190 MB file. After we hit the post button, the browser disconnects immediately (without timedelay) with the message: page cannot be displayed.
    for me it looks like we hit some restriction.
    any idears how to manage the 220 MB file in the browser beside splitting it into smaller files would be greatly appreciated.
    thx a lot in advance and regards from
    Michael

    Hello again,
    could it be this parameter which is for the limitation responsible ?
    icm/HTTP/max_request_size_KB   = 102400
    thx and best regards from Michael

  • Duplicate file handling using Module

    Hi All
    The Scenario is like this------
    XI is picking a files from FTP location.
    Duplicate files are also getting picked by XI.
    To handle this i have written a module using NWDS which is finding it out wheather the file is duplicate or not. If the file is not duplicate then it is getting processed.
    Now the problem i am facing is
    I dont want to process the file if it is found duplicate, then what code i should write.
    What are the ways i can stop the processing of duplicate file.
    Regards
    Dheeraj Kumar

    Hi
    I have implemented a module in which i can find out wheather the file is duplicate or not. If the file is not duplicate process the file.
    now the problem is --- if file is duplicate then i dont want to process the file.
    How can i achieve this?
    Regards
    Dheeraj Kumar
    Edited by: Dheeraj Kumar on Nov 30, 2009 3:21 PM

  • Duplicate File Handling using Adapter Module

    Hi All
    The Scenario is like this------
    XI is picking a files from FTP location.
    Duplicate files are also getting picked by XI.
    To handle this i have written a module which is finding it out wheather the file is duplicate or not. If the file is not duplicate then it is getting processed.
    Now the problem i am facing is -
    I dont want to process the file if it is found duplicate, then what code i should write.
    What are the ways i can stop the processing of duplicate file. 
    Regards
    Dheeraj Kumar

    Hi
    I have implemented a module in which i can find out wheather the file is duplicate or not. If the file is not duplicate process the file.
    now the problem is --- if file is duplicate then i dont want to process the file.
    How can i achieve this?
    Regards
    Dheeraj Kumar
    Edited by: Dheeraj Kumar on Nov 30, 2009 3:21 PM

  • File Uploads using stored procedures

    Hello, I'm quite new here, but I have a question that I've been butting my head against for the past day. Here goes.
    We need to upload a file using a stored procedure (PL/SQL procedure.)
    The two things I have found that work are
    1) Having oracle do the file handling (using bfiles) in the procedure
    2) using an insert statement directly to upload the file contents into a blob.
    The platform is php (Oracle instant client) and I will show some code examples.
    1) is unworkable because Oracle will not have direct access to any files.
    2) is fine, but we would prefer to use a procedure so as to abstract what exactly goes on and possibly other operations away from the php and the framework.
    What worked:
    1)
    CREATE OR REPLACE PROCEDURE php_upload_file (file_name in varchar2, canonical_name in varchar2, owner in number, file_id IN OUT number)
    AS
    src_loc bfile:= bfilename('DOC_LOC',php_upload_file.file_name);
    dest_loc BLOB;
    begin
    insert into files values(owner,canonical_name,empty_blob(),files_seq.nextval) returning files.data, files.file_id
    into dest_loc, file_id;
    dbms_lob.open(src_loc,DBMS_LOB.LOB_READONLY);
    DBMS_LOB.OPEN(dest_loc, DBMS_LOB.LOB_READWRITE);
    DBMS_LOB.LOADFROMFILE(
    dest_lob => dest_loc
    ,src_lob => src_loc
    ,amount => DBMS_LOB.getLength(src_loc));
    DBMS_LOB.CLOSE(dest_loc);
    DBMS_LOB.CLOSE(src_loc);
    COMMIT;
    end;
    'DOC_LOC' is a directory I've set up that the user has access to.
    Interfacing with PHP this just looks like
    oci_parse($conn,"BEGIN php_upload_file('{$uploadfilename}','{$propername}',{$ownerid},:file_id); END;");
    Dead simple, right?
    I also do a bind command to pull out 'file_id' so I know the id that was just inserted.
    The other solution is
    $contents = file_get_contents($_FILES["uploadedfile"]["tmp_name"]);
    $lob = oci_new_descriptor($conn, OCI_D_LOB);
    $stmt = oci_parse($conn,
    "INSERT INTO files (employee_id, filename, data, file_id) VALUES(175,'"
    .$_FILES["uploadedfile"]["name"].
    "', empty_blob(), files_seq.nextval) RETURNING file_id, files.data INTO :file_id, :src_contents");
    where :src_contents is binded to a lob and :file_id as before is binded to an INT:
    oci_bind_by_name($stmt, ':src_contents', $lob, -1, OCI_B_BLOB);
    oci_bind_by_name($stmt, ':file_id', $insert_id, -1, SQLT_INT);
    oci_execute($stmt,OCI_DEFAULT);
    In this case the last thing I do before the commit is
    $lob->save($contents);
    Both work fine, but what I need is this
    $contents = file_get_contents($_FILES["uploadedfile"]["tmp_name"]);
    $lob = oci_new_descriptor($conn, OCI_D_LOB);
    $stmt = oci_parse($conn,"BEGIN do_upload_file(:src_contents,'{$propername}',{$ownerid},:file_id); END;");
    oci_bind_by_name($stmt, ':src_contents', $lob, -1, OCI_B_BLOB);
    oci_bind_by_name($stmt, ':file_id', $insert_id, -1, SQLT_INT);
    oci_execute($stmt,OCI_DEFAULT);
    $lob->save($contents);
    oci_commit($conn);
    this omits error conditions (such as on $lob->save ... etc.) it is simplified.
    The content of the procedure I changed as follows, but it seems untestable.
    CREATE OR REPLACE PROCEDURE do_upload_file (src_contents IN OUT blob, canonical_name in varchar2, owner in number, file_id IN OUT number)
    AS
    dest_loc BLOB;
    begin
    insert into files values(owner,canonical_name,empty_blob(),files_seq.nextval) returning files.data, files.file_id
    into dest_loc, file_id;
    dbms_lob.open(src_contents,DBMS_LOB.LOB_READONLY);
    DBMS_LOB.OPEN(dest_loc, DBMS_LOB.LOB_READWRITE);
    DBMS_LOB.COPY(dest_lob => dest_loc,
    src_lob => src_contents
    ,amount => DBMS_LOB.getLength(src_contents));
    DBMS_LOB.CLOSE(dest_loc);
    DBMS_LOB.CLOSE(src_contents);
    COMMIT;
    end;
    I don't get errors because I cannot figure out a way to run this procedure in my PL/SQL environment with valid data. (I can run it with a blank blob.)
    But when I work out the order of what's going on, it doesn't make sense; the commit in the procedure is before the $lob->save(...) and thus it would never save the data... nonetheless it should at least create a record with an empty blob but it does not. What is wrong is beyond the error level that seems to be supported by PHP's oci_error function (unless I have not discovered how to turn all errors on?)
    In any case I think the logic is wrong here, but I'm not experienced enough to figure out how.
    To test it I would need to create a driver that loads an external file into a blob, and passes that blob into the procedure. Trouble is, even if I make a blob and initialize it with empty_blob() it treats it as an invalid blob for the purposes of the dbms_lob.copy procedure.
    If someone has solved this problem, please let me know. I would love to be able to do the file upload with just a single procedure.

    Thanks. In my estimation that is exactly the issue. But that doesn't help with a resolution.
    The actual file size: 945,991 bytes
    If Firefox is miscalculating the length (in Safari/Chrome 945991 and 946241 in Firefox), then Firefox is reporting erroneously and should be raised as a bug in Firefox, would you agree?

  • Maximum file size handled by java

    Hi
    What is the maximum file size that java can handle i.e if I need to read a disk file using java, is there any limit on the size of the file being read?

    The size you can handle is not limited... only by your code :-)
    Check MemoryMappedFiles... i handle Gigabyte files with no problem ;-)

  • Can't delete file after renaming due to Word file handle still present. Error staes document is still in use but it's really not. Worked fine in 2007 but not in 2010.

    I have some code associated with a Word Template. The template is opened, filled out and saved via a routing in vba. This all works fine in older 2007 version (which is version it was originally created in). Once this file is saved, the user can change the
    date in a text box and re-save document. The code saves using the new date for part of new file name and then deletes that older file from the server. It fails at the delete function because the newer version of word is not dropping the file handle from the
    first named file when user saves it to the new filename. In older version (2007) this handle was released as soon as file was saved to a different name. I can't seem to figure out how to release the old document filename so the old document file can be deleted.
    I hope I explained this well enough.
    Here's the code that woeked in version 2007 but fails in version 2010.
    Option Explicit
    Dim CAPEX01 As MSForms.ComboBox
    Dim CAPEX02 As MSForms.ComboBox
    Dim LocalPath As String
    Dim NetPath As String
    Dim OldPath As String
    Dim OldPathNet As String
    Dim DocName01 As String
    Dim DocName02 As String
    Dim DocName03 As String
    Dim DocName04 As String
    Dim DocName As String
    Dim DocNameold As String
    Dim TestDocName As String
    Dim filesys
    Dim newfolder
    Sub AutoOpen()
    ActiveDocument.ActiveWindow.View.Type = wdPrintView
    TestDocName = ActiveDocument.TextBox2
    OldPathNet = "\\yourPath\" & TestDocName & "\"
    End Sub
    Sub AutoNew()
    TestDocName = ActiveDocument.TextBox2
    OldPathNet = "\\yourPath\" & TestDocName & "\"
     ComboBox1.Locked = False
     ComboBox1.Enabled = True
     FillList1
     FillList2
     End Sub
    Sub DeleteOldDoc()
    OldPathNet = "\\yourPath\" & TestDocName ' & "\"
    DocNameold = OldPathNet & TestDocName & "-" & DocName02 & "-" & DocName03 & "-" & DocName04 & ".doc"
        If Not TestDocName = DocName01 Then
            Set filesys = CreateObject("Scripting.FileSystemObject")
        If filesys.FileExists(DocNameold) Then
            filesys.DeleteFile (DocNameold), True      
     'I get file permission error here
        End If
        End If
    If DocName01 <> "" Then
    If Not TestDocName = DocName01 Then
    If Not TestDocName = "" Then
        MsgBox "Project Proposal Has Been Moved From Year " & TestDocName & " To " & DocName01 & ""
    End If
    End If
    End If
    TestDocName = DocName01
    End Sub
    '''''''Document path functions''''''
    Sub chkpath()
    Set filesys = CreateObject("Scripting.FileSystemObject")
    If Not filesys.FolderExists("\\yourPath\") Then
       newfolder = filesys.CreateFolder("\\yourPath\")
    End If
    If Not filesys.FolderExists("\\yourPath\" & DocName01 & "\") Then
        newfolder = filesys.CreateFolder("\\yourPath\" & DocName01 & "\")
    End If
    End Sub
    ''''''Save Function''''''
    Private Sub CommandButton1_Click()
    DocName01 = ActiveDocument.TextBox2
    DocName02 = ActiveDocument.TextBox4
    DocName03 = ActiveDocument.TextBox1
    DocName04 = ActiveDocument.ComboBox1.Value
    chkpath
    NetPath = "\\yourPath\" & DocName01 & "\"
    DocName = NetPath & DocName01 & "-" & DocName02 & "-" & DocName03 & "-" & DocName04
    ActiveDocument.SaveAs2 FileName:=DocName, FileFormat:=wdFormatDocument
     ComboBox1.Locked = True
     ComboBox1.Enabled = False
     ComboBox2.Locked = True
     ComboBox2.Enabled = False
     TextBox1.Locked = True
     TextBox1.Enabled = False
     TextBox3.Locked = True
     TextBox3.Enabled = False
     TextBox4.Locked = True
     TextBox4.Enabled = False
     DeleteOldDoc
    End Sub
    Sub FillList1()
    Set CAPEX02 = ActiveDocument.ComboBox2
      With CAPEX02
          .AddItem "CASTING", 0
          .AddItem "HOT ROLLING", 1
          .AddItem "COLD ROLLING", 2
          .AddItem "FINISHING", 3
          .AddItem "PLANT GENERAL", 4
          .AddItem "MOBILE EQUIPMENT", 5
      End With
    End Sub
     Sub FillList2()
     Set CAPEX01 = ActiveDocument.ComboBox1
      With CAPEX01
          .AddItem "A Name", 0
          .AddItem "Another Name", 1
      End With
    End Sub
    Private Sub CommandButton2_Click()
        UserForm1.Show
    End Sub

    mogulman52 and Don,
    I went back and looked at my code and had already updated it to SaveAs in the new docx format. It still holds the lock handle in place until Word closes, unlike earlier versions which released the lock handle when you did a SaveAs.
    As a note, all my Word and Excel macro-enabled (dotm & xltm) templates are read only and are never filled in, prompting the user for a file name on any close event or if they run the code gets auto-named. I do the SaveAs and concatenate the file name
    from data on the document (or sheet) that has been filled in. During the SaveAs the docx gets saved to a network folder and also on a local folder. The lock gets renamed to the filename and remains until Word is closed.
    So my code still fails at the point noted below while trying to delete an old filename version after the file has been saved as a new filename in a new folder. So....
    The code is looking in the last folder where the docx file was saved for the older filename so it can be deleted. The newest docx version has already been saved in a different folder and has a new lock handle of its own. That lock is not my problem, it's
    the older file lock which really exists in the same folder as the first filename that the docx was saved to. It does not release that lock until I exit Word. My work around has been to instruct all users to manually delete the older version file.
    The other odd thing is this only happens when I run it from code, if you manually go through these steps with the SaveAs menu drop-downs in Word it will release the lock handle???
    Hope this isn't to confusing and thanks for all your suggestions and help.
    Sub DeleteOldDoc()
    OldPathNet = "\\yourPath\" & TestDocName ' & "\"
    DocNameold = OldPathNet & TestDocName & "-" & DocName02 & "-" & DocName03 & "-" & DocName04 & ".doc"
    If Not TestDocName = DocName01 Then
    Set filesys = CreateObject("Scripting.FileSystemObject")
    If filesys.FileExists(DocNameold) Then
    filesys.DeleteFile (DocNameold), True 'I get file permission error here- lock handle is still present from last SaveAs command in last folder where previous version of file was saved.
    End If
    End If
    If DocName01 <> "" Then
    If Not TestDocName = DocName01 Then
    If Not TestDocName = "" Then
    MsgBox "Project Proposal Has Been Moved From Year " & TestDocName & " To " & DocName01 & ""
    End If
    End If
    End If
    TestDocName = DocName01
    End Sub
    Glenn

  • Logging with jdk1.4 - how to add a handler using configuration file

    Hi, all
    I am playing around with java.util.logging in jdk1.4. In particular, I am using a properties file for configuration. However, one thing I couldn't do is to assign a handler, such as the ConsoleHandler, to the com.xyz.foo logger. Everything for the root logger works just fine. Here's the file I use
    handlers= java.util.logging.FileHandler
    .level= INFO
    java.util.logging.FileHandler.pattern = jdk14.log
    java.util.logging.FileHandler.limit = 50000
    java.util.logging.FileHandler.count = 1
    java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
    java.util.logging.ConsoleHandler.level = INFO
    java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
    com.xyz.foo.level = WARNING
    com.xyz.foo.handlers = java.util.logging.ConsoleHandler
    Nothing comes out on the console and everything from the com.xyz.foo logger is logged to jdk14.log file.
    Can any one tell me why the last line has no effect?
    Thanks much!

    Logger configuration files are grossly misunderstood due in large part to extremely poor documentation (some of the worst I have ever seen for the Java platform). The LogManager class uses logger configuration files to do three things:
    1. Load porperties into a private Properties object that application programmers can subsequently access using the getProperty(String name) method in LogManager.
    2. Those properties (or else the documented defaults) are then used to configure the root logger as well as the "global" handlers that are used by the root logger
    3. Finally, whenever a logger is created the Properties object is checked to see if a key exists for the logger name + ".limit". If so, then the logger is assigned that level.
    Notice that nowhere in here does it say that a programmatically created logger is configured. In your case, you must invoke getProperty("com.xyz.foo.handlers"), parse the property value (which is a bit tricky if there is more than one handler class name), load and instantiate the handler class, and invoke addHandler. Great huh? I'm in the middle of a indepth study of logger configuration, and I can tell you for sure the static configuration using configuration files is an order of magnitude harder than dynamic configuration. It offers the advantage of field service engineers being able to change the logger configuration, but at a very significant cost.

  • XML to Excel file using dom4j

    hi!
    i'm new with dom4j and i don't have any idea on how to do the following task:
    i have an xml document which i have to save as an excel file using dom4j. my problem is i also have to insert records in the middle of the file. is it possible?
    sample layout:
    Worksheet Header (also have to plot a value)
    Column Header (also have to plot a value)
    -- need to insert records here --
    Sub-total row
    Total row
    i would appreciate any help from you guys...
    thanks in advance...

    Hi there!
    First I haven't seen any application that uses dom4j to write excel's file, but I can recommend you to use Apache's POI to write and read from any excel's file, actually I'm working rigth now with it, and works fine with Office 2003.
    http://jakarta.apache.org/poi/hssf/
    For the XML you can use what ever you feel confortable with, dom4j, jdom, etc. I really like jdom thougth

  • Maximum file size that OSB can handle for JMS

    Hi,
    We have a requirement to process 60MB xml files over JMS in Oracle Service Bus. While prototyping this we are facing heap space errors.
    Can somebody let me know what is the maximum file size that we can process? The scenario is as below.
    JMS --> OSB --> JMS --> OSB --> JMS
    Thanks

    if you don't need to access the entire content of the message, you can try using content streaming
    (see this OSB - Iterating over large XML files with content streaming discussion)
    See also here http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/context.html#wp1110513 for best practices.
    Otherwise I have noticed myself that OSB is very hungry in memory when loading large messages. I had trouble even with a 5 MB binary file being loaded - this would take 500 MB RAM. in these cases I would rather look for ETL tools such as Oracle Data Integrator or Open Source Pentaho.

  • Maximum file size data that can be send to MQ using mq adapter

    Dear All,
    What is the maximum file size data that can be send to MQ using mq adapter ?
    The file can be csv, fixed , xml.
    Please let me know if anybody is aware of any limitations
    Best Regards
    Arc

    If you are on 10g then you are looking at a limit of 7MB, although any messages over 1MB will require some tuning.
    You can integrate using the native schema, or xml so you can use csv, fixed length, and xml files.
    cheers
    James

  • Using File handling in JSP

    hi, I am working on website where i have to use file handling instead of database.i m using JSP,the job is,site's contact us page's information should store in a file (.txt) and as a administrator login then this file retrievs details of all the contact us forms information to a new page which directly open as administrator login.
    i am facing problem doing this please help how can i do this.its urgent.

    hi Shalini,
    Regadring upload please follow the link given below
    http://www.jguru.com/faq/view.jsp?EID=160
    Regarding reading the xl sheet, that you can do using this way
    try {
            BufferedReader in = new BufferedReader(new FileReader("xl sheet name.xsl"));
            String str;
            while ((str = in.readLine()) != null) {
                process(str);// what ever u want to with the line
            in.close();
        } catch (IOException e) {
        }See its alway easy to read data and print them in row/col
    format if it contains a delimiter(like * or , or |) after
    every column data. U can use StringTokenizer for separating
    out each column data.
    Just try this and see whether u r able to read or not.
    regards
    Goodieguy

  • I have 2 concerns, first my Canon 5d Mark II is not showing up when I try to download pictures.  I have to use the card reader to do so.  Then there is no file handling window available anywhere.  Please help.  Jim R.

    I have 2 concerns, first my Canon 5D MarkII is not showing up in the input source when I download to lightroom.  I have to use the card reader to do so.  Then there is no File Handling Section listed anywhere.  Please Help.  Thanks Jim R.

    You should find the forum for whatever prdouct your posting concerns and ask for help there. 
    Here is a link to a page that has links to all Adobe forums...
    Forum links page:
    https://forums.adobe.com/welcome

  • Finding open file handles from core file using mdb/dbx

    Is it possible to find open file handles from a core file? The env is Solaris 5.10 SPARC.
    regards
    becks

    Interesting question, but it's more about Solaris OS/libraries than about Sun Studio C++ compiler. While there's a chance of getting it answered here, I also recommend to post the same question on one of the OpenSolaris forums:
    http://www.opensolaris.org/jive/index.jspa?categoryID=1
    For example, mdb forum:
    http://www.opensolaris.org/jive/forum.jspa?forumID=4

  • Maximum file size for Adobe LightRoom?

    I was just wondering in anyone here had an idea on the maximum file ( DNG/RAW/Tiff/JPG ) size LightRoom will handle given enough RAM and a fast processor?

    Dear Paig,
    This is a tough one as this is a scan of a B&W 6X6 B&W negative done on a very high res Scitech scanner. It is a .tif file and the file size is only 139MB. What it would equate to in MP is hard to tell. I will be trying to use LR on scans I do on a Nikon SuperCoolScan 9000 and it too renders 48 bit color tif image files.
    I wounder if more RAM would help. The Dual Core 2.66 xeon processors should be plenty fast enough to deal with LT 2.3
    I had read some discussions of memory leak problems with LR and it seems as though this might be the case as after 15 adjustments and nothing elso open on the MacPro to see my used RAM up to 4.5 GB indicates that something is amiss...
    Thoughts anyone?

Maybe you are looking for

  • Reporting on Access Control 5.3 with SAP BO 4.0

    Hello All, I have to develop WebI reports on Access Control 5.3 data. Are there any direct connectivity options available in IDT for Access Control 5.3 or Do I have to go through Oracle database connectivity as Access control 5.3 backend database is

  • Charging using Universal dock

    Hi, I've bought an iPod Touch together with an Universal Dock (Apple branded). I have an old sector adapter that came with my old iPod (3 gen). When I plug the sector adapter to my iPod Touch, the batterie charges itself ok. But when I plug it to the

  • Create Directory Dialog box without specifying file name

    Hi all Programmers/Developers/JDC memebers I would like to know in java is there any method or class which helps to give directory dialog box without specifying filename. I mean to say if u have c,d,e drives and some directories under them c:\dir1 c:

  • Album Starter Edition 3.0 Won't Initialize

    I had Adobe Photoshop Album Starter Edition 3.0.1 installed to service my Epson scanner and learn how to work with digital images. I built a file in the album that contained a few unimportant photos it imported from another computer on my LAN. (I rea

  • ORA-00933: SQL command not properly ended: error in TRIGGER

    Hi , I tried the following example trigger but unable to trace the error.. Could you please find it... CREATE OR REPLACE TRIGGER trig1 AFTER INSERT OR UPDATE OR DELETE OF RLID,RL ON X_RLM_T REFERENCING NEW AS NEW OLD AS OLD FOR EACH ROW DECLARE rlmId