Hi Roman, Thanks! That makes it much clearer! But I Still do not understand what is meant by "Unwanted" in the closeOutUnwantedEmbeddedTags()... :( David Fu. > > Hi, > >> Hi Sven, Roman, and All, >> I am currently working on the HTMLWriter. Does anybody have an idea what >> is meant by an Embedded Tag for the writeEmbeddedTags() method? I am >> guessing it is the hidden input used in HTML forms, but the >> closeOutUnwantedEmbeddedTags() method does not really make sense here. > > Embedded tags have nothing to do with <embed> and the like. Embedded > taghs here means tags that are stored as attributes in other tags. This > is true for most character level tags like <b>, <i> etc. Those are not > modeled as elements in the document structure, but instead as attributes > in other tags. For example this snipped: > > <p><i>Hello <b>World</b></i></p> > > is modeled like this (play with it in the HtmlDemo in examples/ ): > > <p > name=p > > > <content > name=content > > i=gnu.javax.swing.text.html.parser.SmallHtmlAttributeSet@aff1c4f0 > > > [0,6][Hello ] > <content > name=content > > i=gnu.javax.swing.text.html.parser.SmallHtmlAttributeSet@aff1c4f0 > > b=gnu.javax.swing.text.html.parser.SmallHtmlAttributeSet@aff1f230 > > > [6,11][World] > > As you can see there's the normal handling for the <p> tag (a separate > element) and the character level tags are modeled as attributes of the > synthetic content - element. These tags have the actual tag as attribute > key, and their own attributes (if any) as the value. > > I hope this helps... > > /Roman > > >