Hi Inandjo,
Thanks for the update, glad all is well for you now ;)
-Jacob Danner

On 4/27/07, Inandjo Taurel <[EMAIL PROTECTED]> wrote:
Hi,

Sorry for the late reply but I finally got it working. Indeed, the save
function works, and the file size was 257Mb.
Thanx again!!


>From: "Jacob Danner" <[EMAIL PROTECTED]>
>Reply-To: [email protected]
>To: [email protected]
>Subject: Re: OutOffMemory error while transforming and xmlobjet to a
>String!!
>Date: Tue, 24 Apr 2007 08:16:44 -0700
>MIME-Version: 1.0
>Received: from mail.apache.org ([140.211.11.2]) by
>bay0-mc11-f19.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Tue,
>24 Apr 2007 08:17:09 -0700
>Received: (qmail 84410 invoked by uid 500); 24 Apr 2007 15:17:15 -0000
>Received: (qmail 84399 invoked by uid 99); 24 Apr 2007 15:17:15 -0000
>Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133)
>by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2007 08:17:15 -0700
>Received: pass (herse.apache.org: domain of [EMAIL PROTECTED]
>designates 66.249.82.236 as permitted sender)
>Received: from [66.249.82.236] (HELO wx-out-0506.google.com)
>(66.249.82.236)    by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr
>2007 08:17:05 -0700
>Received: by wx-out-0506.google.com with SMTP id s11so2245222wxc        for
><[email protected]>; Tue, 24 Apr 2007 08:16:45 -0700 (PDT)
>Received: by 10.90.118.12 with SMTP id q12mr2090170agc.1177427804887;
>  Tue, 24 Apr 2007 08:16:44 -0700 (PDT)
>Received: by 10.100.48.1 with HTTP; Tue, 24 Apr 2007 08:16:44 -0700 (PDT)
>X-Message-Info:
>txF49lGdW40rntEEfUn4mzlAiqtayfHrBypdV8jV2attBpNsXm7a3UPgCTCa6mCW
>Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
>Precedence: bulk
>List-Post: <mailto:[email protected]>
>List-Help: <mailto:[EMAIL PROTECTED]>
>List-Unsubscribe: <mailto:[EMAIL PROTECTED]>
>List-Id: <user.xmlbeans.apache.org>
>Delivered-To: mailing list [email protected]
>X-ASF-Spam-Status: No, hits=-0.0 required=10.0tests=SPF_PASS
>X-Spam-Check-By: apache.org
>DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed;        d=gmail.com; s=beta;
>
>h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
>
>b=CC9Hvdril6Z0KbiUWq0oFX0G01XUICUDyS3Ogr5NnvfLEdqG63YPNvhTC76E8oKK1GKPRkOS7OzEk8304+1bM8TlWscvrzyAg7ScjYaeDRtSs/PEju5YUxrpZcdJe+ef+bYFFJKcTeIYY5JQAzaF3JmvBJD+mucR+87LT2KKttE=
>DomainKey-Signature: a=rsa-sha1; c=nofws;        d=gmail.com; s=beta;
>
>h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
>
>b=EwDw/n9HsctL5nkxaDZvIK0lO5toEBo0CzMtzXkrXwkKsQSs5xAzzf9lCjbUgcWwqixmMEbqpFMexG6Ko1Dd6a7aqgw/U7/awMaWZuHczClH26zoeXDJmBIpEYymUKGSexPGKhff/08dcZcMHRo3IK4uh305K1sFs3t6YQBNO1o=
>References: <[EMAIL PROTECTED]>
><[EMAIL PROTECTED]>
><[EMAIL PROTECTED]>
>X-Virus-Checked: Checked by ClamAV on apache.org
>Return-Path: [EMAIL PROTECTED]
>X-OriginalArrivalTime: 24 Apr 2007 15:17:09.0323 (UTC)
>FILETIME=[A06611B0:01C78683]
>
>If you have an XmlObject already, the easiest way I know to write a
>file is via the save() method on the XmlObject. So in your source
>above, if docXml is an XmlObject, rather than getting the string and
>writing the string out to a file, why not do it directly via
>docXml.save(new File(some/File/name.xml);
>
>If this works will you let us know the size of the file you wrote.
>
>To clarify, you are trying to go from:
>String -> XmlObject -> String -> File I/O
>
>If this String is really large like you say, this might be your
>problem. As you will have ~ 3 instances of the data since XMLBeans is
>similar to DOM in how it keeps its information.
>
>-Jacob Danner
>
>On 4/24/07, inandjo <[EMAIL PROTECTED]> wrote:
>>
>>Hi Jacob,
>>
>>The size of the JVM is already increased to 2048kb, but the thing is that
>>I
>>can't even evaluate the size of the String I'm trying to write to a file;
>>that's because I get the String from and XMLObject child with the method
>>toString() or even xmlText().
>>Now the crash occurs when I write the following code:
>>
>>String s = docXML.toString();
>>
>>In fact what I need to do is to write the object content progressively,
>>but
>>even that way, I can't even get a String representation of the XMLObject,
>>although I can manipulate the docXML object.
>>Do you have any idea as to how I can write that object to a file??
>>
>>
>>
>>Jacob Danner-2 wrote:
>> >
>> > Have you tried increasing the memory space of the JVM?
>> > What is the current size? How big is the String you are parsing?
>> > Thanks,
>> > -Jacob Danner
>> >
>> >
>> > On 4/24/07, inandjo <[EMAIL PROTECTED]> wrote:
>> >>  Hi, I have an app that generated XML file using xmlBeans, and to do
>>so,
>> >> I
>> >> have to feed the xmlobject with data that can be huge sometimes.
>>Before i
>> >> create the file from the xmlobject, i get the xmlobject in the form of
>>a
>> >> String with the method xmlText() or even toString(). In both case, I
>>get
>> >> an
>> >> OutOffMemory error, because the String representation just seems to be
>> >> too
>> >> big . Does anybody have an idea on how I can progressively write the
>> >> string
>> >> representation of that xmlobject, without running out of memory??
>>.....
>> >> ..... ..... docXML.setOperationsl(operation); return
>>docXML.toString();
>> >> //
>> >> exception at this point when I return the String.
>> >
>>
>>--
>>View this message in context:
>>http://www.nabble.com/OutOffMemory-error-while-transforming-and-xmlobjet-to-a-String%21%21-tf3638662.html#a10162935
>>Sent from the Xml Beans - User mailing list archive at Nabble.com.
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to