Oracle8i Application Developer's Guide - XML Release 3 (8.1.7) Part Number A86030-01 |
Library | Service | Contents | Index

XDK for Java: Specifications and Cheat Sheets, 10 of 15

## XML Java Class Generator Cheat Sheet

Table C-5 lists the main XML Parser for Java APIs and top level classes with a brief description of each.

##### Table C-5 XML Java Class Generator: APIs and Classes

Classes | Description
--- | ---
Classes |
CGDocument | Serves as the base document class for the Class Generated generated classes
CGNode | Serves as the base class for nodes generated by the Class Generated
ClassGenerator | This class is used by the Class Generated to generate classes
Exceptions |
InvalidContentException | Definition of InvalidContentException thrown by dtdcompiler classes

##### Table C-6 XML Java Class Generator: Default Constructors

ClassGenerator() | Default constructor for ClassGenerator.
--- | ---
generate(DTD, String) Class | Traverses the DTD with element doctype as root and generates Java classes
setGenerateComments(boolean) | Switch to determine whether to generate java doc comments. Default - TRUE
setJavaPackage(String) | Sets the package for the classes generated. Default - No package
setOutputDirectory(String) | Sets the output directory. Default - current directory
setSerializationMode(boolean) | Switch to determine if the DTD should be saved as a serialized object or as text file.
setValidationMode(boolean) | Switch to determine whether the classes generated should validate the XML Document being constructed.Default - TRUE
CGDocument(String, DTD) Class | Constructor for the Root element of the DTD. public abstract class CGDocument extends CGNode. Serves as the base document class for the DTD compiler generated classes
print(OutputStream) | Prints the constructed XML Document
print(OutputStream, String) | Prints the constructed XML Document
public abstract class CGNode | extends Object. Serves as the base class for nodes generated by the XML Class Generator.
CGNode(String) | Constructor for the Elements of the DOM Tree
addData(String) | Adds PCDATA to the Element
addNode(CGNode) | Adds a node as a child to the element
getCGDocument() | Gets the base document (root Element)
getDTDNode() | Gets the static DTD from the base document
setAttribute(String, String) | Sets the value of the Attribute
setDocument(CGDocument) | Sets the base document (root Element)
storeID(String, String) | Store this value for an ID identifier, so that we can later verify IDREF values
storeIDREF(String, String) | Store this value for an IDREF identifier, so that we can later verify, if an corresponding ID was defined.
validateContent() | Checks if the content of the element is valid as per the Content Model specified in DTD
validEntity(String) | Checks if the ENTITY identifier is valid
validID(String) | Checks if the ID identifier is valid
validNMTOKEN(String) | Checks if the NMTOKEN identifier is valid

| Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
Library | Service | Contents | Index