[All Packages]  [Next Class]

Class: XMLClassGenerator

This class contain method for generating classes based on a DTD or Schema.


Method Index

generate Generate classes from DTD
generate Generate classes from Schema

Methods

generate

Function:
Generates classes for the given DTD. Two files are created in the output directory outdir (or in the currect directory if outdir is NULL): DTDname.h and DTDname.cpp, both named after the DTD. One class is generated for each defined element in the DTD.

Prototype:
uword XMLClassGenerator::generate(DocumentType *dtd, DOMString outdir)

Arguments:
dtd -- DTD whose elements to generate classes for
outdir -- directory in which to place output files

Returns:
uword -- error code, 0 on success

generate

Function:
Generates classes for the given Schema. Two files are created in the output directory outdir (or in the currect directory if outdir is NULL): name.h and name.cpp. One class is generated for each element in the Schema.

Prototype:
uword XMLClassGenerator::generate(Schema *schema, DOMString name, DOMString outdir)

Arguments:
schema -- Schema whose elements to generate classes for
name -- Name for generated files and enclosing C++ namespace
outdir -- directory in which to place output files

Returns:
uword -- error code, 0 on success