jp.ne.dti.lares.foozy.sasax
Class ChoiceDemo
java.lang.Object
|
+--jp.ne.dti.lares.foozy.sasax.ChoiceDemo
- All Implemented Interfaces:
- DemoConstants
- public class ChoiceDemo
- extends java.lang.Object
- implements DemoConstants
Demonstration how to parse runtime determined XML document.
This class can parse XML document,
which matches against below schema.
<xs:schema
targetNamespace="http://www.lares.dti.ne.jp/~foozy/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:local="http://www.lares.dti.ne.jp/~foozy/">
<xs:simpleType name="int">
<xs:restriction base="xs:integer"/>
</xs:simpleType>
<xs:simpleType name="string">
<xs:restriction base="xs:token"/>
</xs:simpleType>
<xs:element name="envelope">
<xs:complexType>
<xs:choice>
<xs:element name="int" type="local:int"
form="qualified"/>
<xs:element name="string" type="local:string"
form="qualified"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
This class reads XML document in from standard input
at invocation of main(String[])
.
- Author:
- FUJIWARA Katsunori <foozy@lares.dti.ne.jp>(code/doc)
Method Summary |
static void |
main(java.lang.String[] args)
Invoke demonstration. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChoiceDemo
public ChoiceDemo()
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Invoke demonstration.