Java and parsing xsd to build a user interface

Discussion in 'XML' started by TIANA, Jan 7, 2005.

  1. TIANA

    TIANA Guest

    Hi guys,
    unfortunately i'm a newbee to java and xml and xsd...
    part of my xsd looks like this:
    <xs:simpleType name="val">
    <xs:restriction base="xs:string">
    <xs:enumeration value="aa"></xs:enumeration>
    <xs:enumeration value="bb"></xs:enumeration>
    <xs:enumeration value="cc"></xs:enumeration>
    </xs:restriction>
    </xs:simpleType>

    could anyone give me a hint, how to parse my xsd in java
    to fill a combobox out of the values in the enumeration tags?
    I guess I have to work around with jdom?!?
    I'm working with java 1.4.1..
    would be glad for any help or hint
    thanks in advance
    tiana
     
    TIANA, Jan 7, 2005
    #1
    1. Advertising

  2. TIANA wrote:

    > Hi guys,
    > unfortunately i'm a newbee to java and xml and xsd...
    > part of my xsd looks like this:
    > <xs:simpleType name="val">
    > <xs:restriction base="xs:string">
    > <xs:enumeration value="aa"></xs:enumeration>
    > <xs:enumeration value="bb"></xs:enumeration>
    > <xs:enumeration value="cc"></xs:enumeration>
    > </xs:restriction>
    > </xs:simpleType>
    >
    > could anyone give me a hint, how to parse my xsd in java
    > to fill a combobox out of the values in the enumeration tags?
    > I guess I have to work around with jdom?!?
    > I'm working with java 1.4.1..
    > would be glad for any help or hint
    > thanks in advance
    > tiana



    Your right, you have to use some kind of xml reader, that can be a dom or sax,
    just use what you think is suitable for the situation.
    If you only have to read the values you can use SAX, but i find sax somewhat strange
    to use, jdom is more logical i think; only it consumes more memmory and is slower.

    If you dont know how to use JDom just read the api's.
     
    Tjerk Wolterink, Jan 8, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TIANA

    java and parsing xsd

    TIANA, Jan 7, 2005, in forum: Java
    Replies:
    1
    Views:
    648
    Harish
    Jan 8, 2005
  2. TIANA
    Replies:
    2
    Views:
    1,506
  3. Markus
    Replies:
    1
    Views:
    1,145
    Markus
    Nov 22, 2005
  4. Rick Razzano

    XSD document for XSD defintion

    Rick Razzano, Sep 26, 2003, in forum: XML
    Replies:
    1
    Views:
    506
    C. M. Sperberg-McQueen
    Sep 26, 2003
  5. Bernd Oninger
    Replies:
    1
    Views:
    534
    Henry S. Thompson
    Jun 30, 2004
Loading...

Share This Page