logo       

Related Msgs: audio.musicbrai...    enbd.general/20...    ietf.idr/2002-0...    java.ant-contri...    gnu.make.genera...    qplus.devel/200...    video.freevo.cv...    os.netbsd.ports...    yellowdog.gener...    xfree86.cvs/200...    search.nutch.us...    freedesktop.xse...    programming.swi...    capabilities.ge...    telephony.pbx.a...    mail.sylpheed.c...    db.firebase.por...    boot-loaders.u-...    recreation.radi...    netbsd.bugs/200...    web.zope.plone....    user-groups.lin...   

Re: Hi, i have a problem with the setFeature method: msg#00046

Subject: Re: Hi, i have a problem with the setFeature method
Hi Axel,

"Axel Osorio" <ato@xxxxxxxxxxxxx> 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: mrglavas@xxxxxxxxxx
E-mail: mrglavas@xxxxxxxxxx



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo