users@jaxb.java.net

Re: Using CDATA in JAXB?

From: Bill Chmura <Bill_at_Explosivo.com>
Date: Thu, 09 Jan 2003 09:55:38 -0500

Well, kind of. The contents of the Bio field are mostly text with some
HTML markups in there. For example, some bold tags <B></B> or <P></P>
tags which the parser wants to handle.

I got around it by defining <p> in the schema and telling them nothing
else is allowed. Before we were using JAXB and just hand editing the
XML and doing XSL we had the CDATA so the parser would ignore the
possibly bad HTML code inside the bio...



-----Original Message-----
From: Discussion list for the Java Architecture for XML Binding
[mailto:JAXB-INTEREST_at_JAVA.SUN.COM] On Behalf Of Kohsuke Kawaguchi
Sent: Tuesday, January 07, 2003 11:54 AM
To: JAXB-INTEREST_at_JAVA.SUN.COM
Subject: Re: Using CDATA in JAXB?


Since the contents of <Bio> is just a plain text, the default binding
should give you what you want. That is, HTML is parsed just as a string.
You can then pass it to a HTML parser, for example.


regards,
--
Kohsuke KAWAGUCHI                  408-276-7063 (x17063)
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com