Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xml to java

Status
Not open for further replies.

Sahmed45

Programmer
Oct 7, 2009
2
DE
ANYONE CAN WRITE THIS XML FILE TO JAVA?????
OR CAN TELL WHAT TO DO???

<xs:simpleType name="Temperature"> <xs:annotation>
<xs:documentation>Value of Temperature</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="Hot"/>
<xs:enumeration value="cold"/>
<xs:enumeration value="WARM"/>
</xs:restriction>
</xs:simpleType>
 
And after that, if anyone can write it to an apple, please let me know

Cheers,
Dian
 
Just write
Code:
To:
Java
p.a. Sun Microsystems
USA
Onto the address area of the envelope, and it should arrive fine, I guess.

HTH
TonHu
 
Java means Java code..
Not to Java corporation...
 
Oh, Java code ...
Code:
public class WriteToJava {
  public static void main(String[] args) {
    System.out.println("<xs:simpleType name=\"Temperature\">        <xs:annotation>
<xs:documentation>Value of Temperature</xs:documentation>
</xs:annotation>
<xs:restriction base=\"xs:string\">
<xs:enumeration value=\"Hot\"/>
<xs:enumeration value=\"cold\"/>
<xs:enumeration value=\"WARM\"/>
</xs:restriction>
</xs:simpleType> ");
  }
}

Cheers,
Dian
 
Hm, guess that's not quite helpful as well :-D, but who's not laughing?

Sahmed45, where does that definition come from? an xsd?, a wsdl?, an xsl(t)? Determine that, and use the corresponding technology to generate Java sourcecode from the definition.

HTH
TonHu
 
It's not plain xml it's part of an xsd or wsdl or xslt definition, so that's not going to work. And (quite surely) not with Java 1.4

HTH
TonHu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top