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 "Eric E. Penetar" <ep...@ccs.neu.edu> on 2002/04/16 00:04:38 UTC

Creating Break Elements

The problem that I am having is regarding parsing <br> tags in an HTML
document. I keep getting an error saying that <br> needs to be ended with
an </br> tag. However, no matter what I try (using HTMLBRElement or
TextElement or HTMLElement) I cannot get an </br> tag. Is there a parser
feature that can be turned off or is there any way to get a <br> and a
matching </br>? I am not having this problem with any other tags (b, ul,
etc) only the br.

Thanks,

Eric Penetar


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


Re: Creating Break Elements

Posted by "David M. Hirst" <dh...@ccs.neu.edu>.
One other option would be to discard the HTMLDocument classes entirely,
and instead create all the neccesary tags as if they were xml tags. It's a
bit of a hack but seems to do the trick

On Tue, 16 Apr 2002, Andy Clark wrote:

> "Eric E. Penetar" wrote:
> > The problem that I am having is regarding parsing <br> tags in an HTML
> > document. I keep getting an error saying that <br> needs to be ended with
>
> Most HTML documents are *not* well-formed XML documents and
> therefore cannot be parsed with an XML parser. For possible
> solutions, please see my response to David Hirst's post titled
> "validating html".
>
> --
> Andy Clark * andyc@apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org
>


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


Re: Creating Break Elements

Posted by Andy Clark <an...@apache.org>.
"Eric E. Penetar" wrote:
> The problem that I am having is regarding parsing <br> tags in an HTML
> document. I keep getting an error saying that <br> needs to be ended with

Most HTML documents are *not* well-formed XML documents and
therefore cannot be parsed with an XML parser. For possible
solutions, please see my response to David Hirst's post titled 
"validating html".

-- 
Andy Clark * andyc@apache.org

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