[jdom-interest] <ol Type="Unordered">
baltner at hq.nasa.gov
Thu Aug 8 15:02:12 PDT 2002
My application accepts embedded html in a textarea form field, which it
stores within an element in a XML document along with other data from the
form. Because I also use a textarea form field to edit it, I have to
convert back and forth between the stored form (which includes "<" and ">"
in many tags, and "<" and ">", which is the version passed to and
from the form.
In order for me to store the tagged text using JDOM, I read in the form
field via a servlet, do a simple string replacement, wrap it between
"<root>" and "</root>" and then build a small subdocument using the
SAXBuilder, which I use to extract back the text as an element, with all
the text and html markup as child elements.
This works fine, except there are some weird things happening that I don't
understand. One of them is the unexpected, and unwanted, inclusion of the
attribute Type="Unordered" whenever the text includes the <ol> or <ul>
tags. I cannot figure out
why this is happening but assumed that it must be something in the
sax.build process. I could leave it in but sometimes it gets put in more
than once, which generates a parsing error.
Does anyone know where this comes from and how to disable it?
More information about the jdom-interest