Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Java and parsing xsd to build a user interface

Reply
Thread Tools

Java and parsing xsd to build a user interface

 
 
TIANA
Guest
Posts: n/a
 
      01-07-2005
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
 
Reply With Quote
 
 
 
 
Tjerk Wolterink
Guest
Posts: n/a
 
      01-08-2005
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XML + XSD: Is it possible to get all errors against the XSD? Markus Java 1 11-22-2005 02:53 PM
Java and parsing xsd tu build a gui TIANA Java 2 01-18-2005 07:09 PM
java and parsing xsd TIANA Java 1 01-08-2005 12:19 AM
SWsoft Acronis Disk Director Suite 9.0 Build 508, Acronis OS Selector 8.0 Build 917, Acronis Partition Expert 2003 Build 292, Acronis Power Utilities 2004 Build 502, F-SECURE.ANTI vIRUS.PROXY v1.10.17.WINALL, F-SECURE.ANTI vIRUS v5.50.10260 for CITRI vvcd Computer Support 0 09-25-2004 01:38 AM
Difference between <import ....xsd> and <xlink:href=.....xsd> ???? Bernd Oninger XML 1 06-30-2004 08:21 AM



Advertisments