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

Using JDeveloper to Build Oracle XML Applications, 7 of 11

## Building XML Applications with JDeveloper

Consider the following example that demonstrates how XML is used to represent data, not present it. It shows the many to one relationship between employees and departments.

### JDeveloper XML Example 1: BC4J Metadata

    <Departments>
    <Dept>
       <Deptno>10</Deptno>
       <Dname>Sales></Dname>
       <Loc>
       <Employees>
         <Employee>
            <Empno>1001></Empno>
            <Ename>Scott</Ename>
            <Salary>80000</Salary>
         </Employee>
       </Employees>
    ...
         </Employee>
       </Employees>
    </Dept>
    <Dept>
    ...

### Procedure for Building Applications in JDeveloper 3.2

To build this project in JDeveloper 3.2 carry out the following steps:

1. Start a New JDeveloper Project by selecting File > New Project.

2. Create a Business Components for Java application.

3. Create an XSQL Page based upon a BC4J application module, by invoking the Page Selector Wizard. See Figure 14-4.

4. Select the application module from the list that pops up.

5. Select the View Object on which you want to base your XSQL Page.

6. Select the columns that you want to view.

When you finish these steps in the Page Wizard, you should have an XSQL Page based on the Business Components for Java (BC4J) framework View objects. When you run this page, it sends the XML data to your browser.

You could optionally create a stylesheet to format the data so that it appears in a way that you prefer or you can tune it so that it can be displayed on a PDA or cellphone.

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