home *** CD-ROM | disk | FTP | other *** search
- /**
- * [=$module]Test.java
- *
- * This file was generated by XMLSPY 5 Enterprise Edition.
- *
- * YOU SHOULD NOT MODIFY THIS FILE, BECAUSE IT WILL BE
- * OVERWRITTEN WHEN YOU RE-RUN CODE GENERATION.
- *
- * Refer to the XMLSPY Documentation for further details.
- * http://www.altova.com/xmlspy
- */
-
-
- package [=$JavaPackageName];
-
- import com.altova.xml.types.*;
-
- public class [=$module]Test {
- protected static void example() throws Exception {
- [ foreach $class in $classes
- if $class.IsInternal
- foreach $member in $class.Members
- if $member.HasTypeObject and $member.TypeObject.NamespacePrefix <> ""
- $RootType = $JavaPackageName & "." & $member.TypeObject.NamespacePrefix & "." & $member.Type
- else
- $RootType = $member.Type
- endif
- $RootSchemaName = $member.XmlName
- $RootNamespaceURI = $member.NamespaceURI
- next
- endif
- next
- ] ////////////////////////////////////////////////////////////////////
- //
- // TODO:
- // Insert your code here...
- //
- // Example code to create and save a structure:
- // [=$module]Doc doc = new [=$module]Doc();
- // [=$RootType] root = new [=$RootType]();
- // ...
- // doc.setRootElementName("[=$RootNamespaceURI]", "[=$RootSchemaName]");
- // doc.setSchemaLocation("[=$module].xsd"); // optional
- // doc.save("[=$module]1.xml", root);
- //
- // Example code to load and save a structure:
- // [=$module]Doc doc = new [=$module]Doc();
- // [=$RootType] root = new [=$RootType](doc.load("[=$module]1.xml"));
- // ...
- // doc.save("[=$module]1.xml", root);
- //
- ////////////////////////////////////////////////////////////////////
- }
-
- public static void main(String args\[\]) {
- try {
- System.out.println("[=$module] Test Application");
- example();
- System.out.println("OK");
- System.exit(0);
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(1);
- }
- }
- }
-