You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Aleksandar Milanovic <am...@galdosinc.com> on 2003/02/21 04:39:35 UTC

maximum size for text content of an element?

Hi,

I got an OutOfMemoryError when I parsed a document of about 5MB in size
despite the fact that I increased the maximum heap size of JVM to 512MB. I
suspect that the problem arose due to the very long textual content of an
element (~55000 characters).

Strangely though, when I broke up the file into two files, I was able to
parse both files separately.

Can it be that the huge string is problematic only in certain circumstances?

This problem happens with JDK 1.4.1_01 and Xerces 2.1 and 2.3.

thx
Alex


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


RE: maximum size for text content of an element?

Posted by Aleksandar Milanovic <am...@galdosinc.com>.
Hi Andy,

The document is parsed through JAXP DocumentBuilder configured to use
Xerces, without deferred node expansion, without validation and with
namespaces. The document does reference XML schemas, but no validation is
performed.

Patiently awaiting round three... :)
Alex

> -----Original Message-----
> From: Andy Clark [mailto:andyc@apache.org]
> Sent: Friday, February 21, 2003 10:58 AM
> To: xerces-j-user@xml.apache.org
> Subject: Re: maximum size for text content of an element?
>
>
> Aleksandar Milanovic wrote:
> > I got an OutOfMemoryError when I parsed a document of about 5MB in size
> > despite the fact that I increased the maximum heap size of JVM
> to 512MB. I
> > suspect that the problem arose due to the very long textual
> content of an
> > element (~55000 characters).
>
> Okay, time for round two. :)
>
> What API are you using? And are you performing any
> validation on the document in question? If so, what
> validation (e.g. DTD or XML Schema)?
>
> --
> Andy Clark * andyc@apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: maximum size for text content of an element?

Posted by Andy Clark <an...@apache.org>.
Aleksandar Milanovic wrote:
> I got an OutOfMemoryError when I parsed a document of about 5MB in size
> despite the fact that I increased the maximum heap size of JVM to 512MB. I
> suspect that the problem arose due to the very long textual content of an
> element (~55000 characters).

Okay, time for round two. :)

What API are you using? And are you performing any
validation on the document in question? If so, what
validation (e.g. DTD or XML Schema)?

-- 
Andy Clark * andyc@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


RE: maximum size for text content of an element?

Posted by Aleksandar Milanovic <am...@galdosinc.com>.
It's not CDATA, but regular text content, something like:

<gml:coordinates>15000 coordinate tuples</gml:coordinates>

Not sure if it makes a difference though. The same problem occured with
Xerces 2.3.0.
Alex

> -----Original Message-----
> From: Andy Clark [mailto:andyc@apache.org]
> Sent: Thursday, February 20, 2003 8:42 PM
> To: xerces-j-user@xml.apache.org
> Subject: Re: maximum size for text content of an element?
>
>
> Aleksandar Milanovic wrote:
> > Can it be that the huge string is problematic only in certain
> circumstances?
>
> This element wouldn't happen to have a large CDATA
> section, would it? This was fixed recently.
>
> --
> Andy Clark * andyc@apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: maximum size for text content of an element?

Posted by Andy Clark <an...@apache.org>.
Aleksandar Milanovic wrote:
> Can it be that the huge string is problematic only in certain circumstances?

This element wouldn't happen to have a large CDATA
section, would it? This was fixed recently.

-- 
Andy Clark * andyc@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org