Bill Fenner wrote:
> When I try to load ftp://ftp.rfc-editor.org/in-notes/rfc-index.xml
> into xxe Professional 3.0 (either via ftp or by loading a local copy),
> I get the following status lines:
> 
> Loading document "ftp://ftp.rfc-editor.org/in-notes/rfc-index.xml";...
> Document "ftp://ftp.rfc-editor.org/in-notes/rfc-index.xml"; loaded.
> Deserializing W3C XML Schema 'http://www.rfc-editor.org/rfc-index'.
> Fetching W3C XML Schema 'http://www.rfc-editor.org/rfc-index' from cache.
> Processing "xi:include" elements in
> "ftp://ftp.rfc-editor.org/in-notes/rfc-index.xml";.
> Stripping superfluous white space from
> "ftp://ftp.rfc-editor.org/in-notes/rfc-index.xml";.
> 
> and then the following exception:
> 
> apple.awt.EventQueueExceptionHandler Caught Throwable :
> java.lang.StackOverflowError
> java.lang.StackOverflowError
> 
> rfc-index.xml is a 4.5 meg file, so perhaps it's unreasonable to try
> to load it?

No, not at all. Especially because it is not styled using a CSS style sheet.



> I tried stripping whitespace using xmllint --noblanks rfc-index.xml >
> rfc-index2.xml but got the same exception when opening rfc-index2.xml.
>  (only 3.5 megs.)

On my Linux box (an ``old'' P4 2.2GHz, 512Mb) with ``old'' Java
1.4.1_07, I can open ftp://ftp.rfc-editor.org/in-notes/rfc-index.xml
without any problem. However, it takes 15 seconds to do so (with local
copies of rfc-index.xml and rfc-index.xsd).

Note that this file is invalid. It contains many empty "keywords"
elements. A "keywords" element should contain at least one "kw" child
element.



> Finally, whether it makes sense to try to load this file or not,
> perhaps you'll agree that it'd be nice to have the GUI report this
> kind of error, rather than having it be "inivisible" on the console.

I'm pretty sure that trying to cope with StackOverflowError would not
work half of the time.

You simply need to increase the stack size used by XXE. In the case of
the Mac, edit Info.plist found somewhere inside XMLEditor.app and change:

---
      <key>VMOptions</key>
      <string>-Xss1m -Xmx512m</string>
---

to:

---
      <key>VMOptions</key>
      <string>-Xss4m -Xmx512m</string>
---

Reply via email to