Skip navigation.

@#^%^*@!@%##

solution for outofmemoryerror when transforming xml files

1.'http://xml.apache.org/xalan/features/incremental'

Set this feature to true to enable incremental transformations. If set to false (the default), the transform and the parse are performed on the same thread.
NoteWhen set to true: If the parser is Xerces, we perform an incremental transform on a single thread using the Xerces "parse on demand" feature. If the parser is not Xerces, we run the transform in one thread and the parse in another. Exception: if the parser is not Xerces and the XML source is a DOMSource, setting this feature to true has no effect.
NoteThe incremental feature is not currently supported by the XSLT Compiling processor, XSLTC.

Example: setting incremental transforms to true (for the XSLT Interpretive processor):



javax.xml.transform.TransformerFactory tFactory =
javax.xml.transform.TransformerFactory.newInstance();
// setAttribute() takes a String and an Object.
tFactory.setAttribute
("http://xml.apache.org/xalan/features/incremental",
java.lang.Boolean.TRUE);
...

2.You can also increase your JVM heap size with the -Xmx or -mx flag, depending on which JVM you are using (you can include both flags, and the JVM will ignore the one it doesn't understand). For example, to give your JVM 64 meg, try
java -Xmx64m -mx64m Class

Convert Date <-> Timestamp in ABAP/4李天霞这种人渣应该剁了喂狗

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies

January 2010
S M T W T F S
December 2009February 2010
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30