users@jaxb.java.net

Re: Document oriented XML Binding framework needed

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Mon, 12 May 2003 08:09:25 -0700

> I had difficulty then XML element is not present (they are optional in
> schema). The list is empty, even there was a text inside. I will expect that
> then elements are optional and there is text I will get List with single
> String not empty list.

So you are saying that if I have a schema like this:

  <xs:element name="foo">
    <xs:complexType mixed="true">
      <xs:sequence>
        <xs:element name="optional" type="xs:int" minOccurs="0" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

and an instance like this:

    <foo> text only! </foo>

then you'll unmarshal an empty list?

> I think Brandon would like to have possibility to bind XML for which there
> is not possible to write schema. I believe that for processing such XMLs,
> DOM is the right technology.

I don't read his post in that way, for me, it is just a question about
the mixed content model. But looks like I'm a minority here.



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