Francesco
Francesco

Reputation: 2382

javax.xml.transform.Transformer input source size limit

Does the Transformer (transform method) has a limit to the size for the input source?

I'm trying to transform a quite long (18M) XML and I get a strange error saying

"The element type "HR" must be terminated by the matching end-tag "</HR>"."

but there is no such element in the input source...

I get the IS this way:

HttpResponse hrep = hclient.execute( get );
InputStream istr = hrep.getEntity().getContent();
Source xmlSource = new StreamSource( istr );
...

If I "cut down" the the input source, than it works...

Or maybe do I miss something?

Upvotes: 1

Views: 1246

Answers (1)

Michael Kay
Michael Kay

Reputation: 163625

Firstly, javax.xml.transform.Transformer is an interface, not an implementation, and any limits are likely to vary with the implementation.

Secondly, this error message gives no suggestion that a limit has been exceeded. Rather, it suggests strongly that your input "XML" is not well-formed.

Upvotes: 2

Related Questions