Hi Axel,

"Axel Osorio" <[EMAIL PROTECTED]> wrote on 05/30/2006 03:46:07 AM:

> Hello.
> 
> My problem is that I was using the documentbuildfactory from sun, 
> and i got an StackoverFlow ina recursivit trough the XML tree.
> then I use Xerces, to get the Document object and iterate over the 
> tree, but the same exception is raised by the DomParser
> This is my code.
> 
> 
> File xmlfile= new File("ruta/archivo.xml");
> DOMParser parserdom =  new DOMParser();
>       parserdom.setFeature("http://apache.
> org/xml/features/validation/balance-syntax-trees", true);
>       parserdom.parse(xmlfile.getAbsolutePath());
> 
> Nut it throws un SAXUnrecognizedException , i think that the 
> setFeature is not recognized, but I don't know how to do to set the 
> Feature of balance-syntax-trees and pass the StackoverFlow exception.

This feature has only existed since Xerces 2.8. Previous releases do not 
recognize it.

Enabling balance-syntax-trees probably wouldn't help you anyway. It's only 
relevant to large DTDs with element declarations of the form <!ELEMENT 
parent (child1|child2|...|child1999|child2000)>. It's not going to prevent 
a StackOverflowError if your application is walking the DOM recursively 
and happens to overflow the stack in doing so.
 
> thank you very much
> 
> Axel Osorio
> Mexico City

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to