0

I am new to xml transformation.

What I've done is to moved my xml to POJO due to JAVA Heap Space Error due to large XML file.

XML + XSLT File ----> XML

is this possible doing this? How?

POJO ----> XSLT File ---- XML

can you give me example. Thanks!

JohnyDerp
  • 1
  • 3
  • One solution that i've found is that converting POJO to XML via XStream then process with XSLT file to produce XML File. Testing is still ongoing if I have issues with memory processing. – JohnyDerp Aug 10 '16 at 01:54

1 Answers1

0

XSLT can't process POJOs, morover, as mentioned in https://bytes.com/topic/net/answers/492204-xsltranslation-large-xml-file-using-java-results-outofmemory

In general, XSLT can't operate as a streaming processor, since its use of XPaths assumes the entire document is available in memory (or at least can be re-read) at once

So maybe you need to try this advice from the same post:

Sometimes, if you have to process large documents, the only good answer is to drop down from XSLT to a lower level and code the processing yourself as a direct SAX application

Dhananjay
  • 544
  • 3
  • 7