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

Using XML Transviewer Beans, 7 of 15

## Using Treeviewer Bean (XMLTreeView() API)

The Treeviewer Bean shows an XML document as a tree. It recognizes the following XML DOM nodes:

- Tag

- Attribute Name

- Attribute Value

- Comment

- CDATA

- PCDATA

- PI Data

- PI Name

- NOTATION Symbol

It takes as input an org.w3c.dom.Document object.

Figure 20-3 illustrates the XML Tree Viewer Bean usage.

A DOM XML document is input to the XMLTreeView.setXMLDocument(doc) method. This associates the XML Tree Viewer with the XML document.

Available TreeViewer Bean methods are:

- getPreferredSize() -- Returns the XMLTreeView preferred size.

- setXMLDocument(Document) -- Associates the XMLTreeViewer with an XML document.

- updateUI() -- Forces the XMLTreeView to update/refresh the user interface.

#### Figure 20-3 XML Tree Viewer Bean Usage

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