escaping - JDOM: creating element from string, which contain xml-code -


I am able to use some text input for XML using jdom, it has the structure:

  & lt; Items & gt; & Lt; Text & gt; Some details & lt; / Text & gt; & Lt; Options .... /> & Lt; / Item & gt; & Lt; Items & gt; & Lt; Text & gt; Some details 2 & lt; / Text & gt; & Lt; Options .... /> & Lt; / Item & gt;   

Then, I need a regular w3c.dom object. I am using this code:

  DOMOutputter domOutputter = new DOMOutputter (); Org.w3c.dom.Documental w3cDoc = domOutputter.output (doctor);   

I am creating element with this code:

  element class = new element ("tekst"); String description = // Some functions returning string desc.addContent (description); E.setContent (DESC);   

Where the new element ("item")

This works fine, but the problem occurs when some XML tags are included in the "Description" user . I want to handle it. I have such output:

  & lt; Text & gt; Bold & amp; Gt; Details & amp; LT; / Bold & gt; & Lt; / Text & gt;   

While creating an element, is there any way to automate those tags? From W3cDoc I am creating a DOMSource with the source and it is necessary for further changes. Maybe I want the place of escaped bracket?

__

dce

have you seen

especially

)

)

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -