PBDOM object hierarchy

The following figure shows the PBDOM object hierarchy:

Figure 14-1: The PBDOM object hierarchy

At the top of the PBDOM hierarchy are P B DOM _ OBJECT, P B DOM _ BUILDER, and P B DOM _ EXCEPTION. P B DOM _ OBJECT has seven  descendants and their names all start with P B DOM _. They are P B DOM _ ATTRIBUTE, CHARACTER DATA, DOC TYPE, DOCUMENT, ELEMENT, ENTITY REFERENCE, and PROCESSING INSTRUCTION. P B DOM _ CHARACTER DATA has two descendants, P B DOM _ COMMENT AND P B DOM _ TEXT. Lastly, P B DOM _ TEXT has one descendant, P B DOM _ C DATA.

PBDOM_OBJECT and its descendants

The base class for PBDOM objects that represent XML nodes, PBDOM_OBJECT, inherits from the PowerBuilder NonVisualObject class. Each of the node types is represented by a PBDOM class whose methods you use to access objects in a PBDOM node tree. PBDOM_OBJECT and its descendants are described in “PBDOM node objects”. You can also find some information about XML node types in the chapter on exporting and importing XML data in the PowerBuilder Users Guide.

PBDOM_BUILDER

The PBDOM_BUILDER class also inherits from NonVisualObject. It serves as a factory class that creates a PBDOM_DOCUMENT from various XML input sources including a string, a file, and a DataStore.

NoteBuilding a PBDOM_DOCUMENT from scratch To build a PBDOM_DOCUMENT without a source that contains existing XML, use the PBDOM_DOCUMENT NewDocument methods.

PBDOM_EXCEPTION

The PBDOM_EXCEPTION class inherits from the PowerBuilder Exception class. It extends the Exception class with a method that returns a predefined exception code when an exception is raised in a PBDOM application. For more information about this class, see “Handling PBDOM exceptions”.