You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Ranjith Kodikara <ra...@dmsswt.com> on 2004/12/07 09:01:27 UTC

org.xml.sax.SAXException: occured... The element type "br" must be terminated by the matching end-tag "
".

Dear Friends,

I have written a java class to parse XML files using SAX (extending DefaultHandler). These xml files are generated from a database, and jsp is written and deployed in oc4j(same as Tomcat). 
For some files only the following error comes... I checked xml files and no difference between xml's that are working fine and giving errors. all xml's are well formed. 

This is the error
The element type "br" must be terminated by the matching end-tag "</br>".
org.xml.sax.SAXException: Stopping after fatal error: The element type "br" must be terminated by the matching end-tag "</br>".

But no br tag in the xml file...

If any of you have experienced this kind of problem or if you know the solution for this, please reply me. I am stuck in this problem...
(If you want to see the .java file I will send it to you.)

Thanks and best regards,
Ranjith

Re: org.xml.sax.SAXException: occured... The element type "br" must be terminated by the matching end-tag "
".

Posted by Glen Mazza <gr...@yahoo.com>.
Ranjith,

Have you tried "process of elimination"?  Just getting
the input file as small as can be to zero/focus in on
the line that is creating the problem?  It may be some
strange character set issue that is causing the
problem.

Also, <br> is an HTML break, which in non-XHTML
doesn't need a <br/>, but your SAX parser will
complain if it doesn't get one.  I wonder if you are
(inadvertently?) feeding your SAX parser an HTML file.
 If so, your HTML will need to be in XHTML format for
whatever you're trying to do to parse correctly.

Glen

--- Ranjith Kodikara <ra...@dmsswt.com> wrote:

> Dear Friends,
> 
> I have written a java class to parse XML files using
> SAX (extending DefaultHandler). These xml files are
> generated from a database, and jsp is written and
> deployed in oc4j(same as Tomcat). 
> For some files only the following error comes... I
> checked xml files and no difference between xml's
> that are working fine and giving errors. all xml's
> are well formed. 
> 
> This is the error
> The element type "br" must be terminated by the
> matching end-tag "</br>".
> org.xml.sax.SAXException: Stopping after fatal
> error: The element type "br" must be terminated by
> the matching end-tag "</br>".
> 
> But no br tag in the xml file...
> 
> If any of you have experienced this kind of problem
> or if you know the solution for this, please reply
> me. I am stuck in this problem...
> (If you want to see the .java file I will send it to
> you.)
> 
> Thanks and best regards,
> Ranjith
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org