|
Re: [xmlc] Adding xhtml code in string form: msg#00032java.enhydra.xmlc
Hmm... I found this thread here. http://mail-archive.objectweb.org/xmlc/2004-09/msg00000.html Unless it's been fixed in the past year, it looks like I'll have to do a horrible CDATA filtering hack like Petr did. :-( Erik --- Erik Rasmussen <i_am_erik@xxxxxxxxx> wrote: > Fine, but that's not the behavior I'm seeing. > > my xhtml file: > --- > <span id="features">features here</span> > --- > > my java code: > --- > final Text textNode = XMLCUtil.findFirstText(node); > if(string.indexOf("</") > 0) > { > // contains xhtml markup > final CDATASection cdata = > page.createCDATASection(string); > if(textNode == null) > { > node.appendChild(cdata); > } > else > { > node.removeChild(textNode); > node.appendChild(cdata); > } > } > else if(textNode != null) > { > textNode.setData(string); > } > else > { > node.appendChild(page.createTextNode(string)); > } > --- > > the result: > --- > <span id="features"><![CDATA[<ul><li>Holds stuff > together</li><li>Detects garden > gnomes</li><li>Repels > vampires</li><li>Traps anti-matter for up to 4 > seconds</li></ul>]]></span> > --- > > So I have to say that I don't really believe you. > Unless there really is a setCDATA() function > somewhere > that I'm missing. I followed what they did in the > link you sent, though. > > Any other suggestions? > Erik > > --- David Li <taweili@xxxxxxxxx> wrote: > > > XMLC doesn't really put CDATA in a setCDATA call. > > It's simple insert > > raw string. > > > > David > > > > > > ______________________________________________________ > Click here to donate to the Hurricane Katrina relief > effort. > http://store.yahoo.com/redcross-donate3/ > > > > -- > You receive this message as a subscriber of the > xmlc@xxxxxxxxxxxxx mailing list. > To unsubscribe: > mailto:xmlc-unsubscribe@xxxxxxxxxxxxx > For general help: > mailto:sympa@xxxxxxxxxxxxx?subject=help > ObjectWeb mailing lists service home page: > http://www.objectweb.org/wws > ______________________________________________________ Click here to donate to the Hurricane Katrina relief effort. http://store.yahoo.com/redcross-donate3/ -- You receive this message as a subscriber of the xmlc@xxxxxxxxxxxxx mailing list. To unsubscribe: mailto:xmlc-unsubscribe@xxxxxxxxxxxxx For general help: mailto:sympa@xxxxxxxxxxxxx?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [xmlc] Adding xhtml code in string form, Erik Rasmussen |
|---|---|
| Next by Date: | Re: [xmlc] Adding xhtml code in string form, Erik Rasmussen |
| Previous by Thread: | Re: [xmlc] Adding xhtml code in string form, Erik Rasmussen |
| Next by Thread: | Re: [xmlc] Adding xhtml code in string form, Justin Akehurst |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |