XML Application Developer's Guide.pdf
(
1356 KB
)
Pobierz
XML Application
Developer’s Guide
Borland
®
JBuilder
™
VERSION 5
Borland Software Corporation
100 Enterprise Way, Scotts Valley, CA 95066-3249
www.borland.com
Refer to the file DEPLOY.TXT located in the
redist
directory of your JBuilder product for a complete list of files that
you can distribute in accordance with the JBuilder License Statement and Limited Warranty.
Borland Software Corporation may have patents and/or pending patent applications covering subject matter in this
document. The furnishing of this document does not give you any license to these patents.
C
OPYRIGHT
© 1997, 2001 Borland Software Corporation. All rights reserved. All Borland brand and product names
are trademarks or registered trademarks of Borland Software Corporation in the United States and other countries.
Other product names are trademarks or registered trademarks of their respective holders.
For third-party conditions and disclaimers, see the Release Notes on your JBuilder product CD.
Printed in the U.S.A.
JB5XML 1E0R0501
0102030405-9 8 7 6 54321
PDF
Contents
Chapter 1
Introduction 1-1
Contacting Borland developer support . . . . . 1-2
Online resources . . . . . . . . . . . . . . . . 1-2
World Wide Web . . . . . . . . . . . . . . . . 1-2
Borland newsgroups . . . . . . . . . . . . . . 1-3
Usenet newsgroups . . . . . . . . . . . . . . 1-3
Reporting bugs . . . . . . . . . . . . . . . . . 1-3
Documentation conventions . . . . . . . . . . . 1-4
Macintosh conventions . . . . . . . . . . . . . . 1-5
Using the model-based components . . . . . . . 3-9
XML-DBMS . . . . . . . . . . . . . . . . . . 3-10
JBuilder and XML-DBMS. . . . . . . . . . . 3-11
XML-DBMS wizard . . . . . . . . . . . . . . 3-11
Setting properties for the model-based
components . . . . . . . . . . . . . . . . . 3-15
Using the component’s customizer . . . 3-15
Using the Inspector . . . . . . . . . . . . 3-19
Chapter 4
Tutorial: Validating and transforming
XML documents 4-1
Overview . . . . . . . . . . . . . . . . . . . . . . 4-1
Step 1: Creating an XML document from
a DTD. . . . . . . . . . . . . . . . . . . . . . . . 4-2
Step 2: Editing the generated XML
document with the data . . . . . . . . . . . . . 4-3
Step 3: Validating the XML document . . . . . . 4-4
Step 4: Associating stylesheets with the
document . . . . . . . . . . . . . . . . . . . . . 4-5
Step 5: Transforming the document using
stylesheets . . . . . . . . . . . . . . . . . . . . . 4-7
Step 6: Setting transform trace options . . . . . . 4-8
Chapter 2
Using JBuilder’s XML features 2-1
Overview . . . . . . . . . . . . . . . . . . . . . . 2-1
Creation and validation of XML . . . . . . . . . 2-2
Creating XML-related documents . . . . . . 2-2
DTD To XML wizard . . . . . . . . . . . . 2-2
XML To DTD wizard . . . . . . . . . . . . 2-4
Viewing XML documents . . . . . . . . . . . 2-5
JBuilder’s XML viewer . . . . . . . . . . . 2-5
Validating XML documents . . . . . . . . . . 2-7
Presentation of XML . . . . . . . . . . . . . . . . 2-9
Cocoon XML publishing framework . . . . . 2-9
Transforming XML documents . . . . . . . . 2-12
Applying internal stylesheets . . . . . . . 2-13
Applying external stylesheets . . . . . . . 2-13
Setting transform trace options . . . . . . 2-15
XML configurations . . . . . . . . . . . . . . . . 2-16
XML resources . . . . . . . . . . . . . . . . . . . 2-17
Programmatic manipulation of XML . . . . . . 2-17
Creating a SAX handler . . . . . . . . . . . . 2-18
Databinding . . . . . . . . . . . . . . . . . . . 2-20
BorlandXML. . . . . . . . . . . . . . . . . 2-20
Castor . . . . . . . . . . . . . . . . . . . . 2-22
Interface to business data in databases . . . . . 2-23
Chapter 5
Tutorial: Creating a SAX Handler
for parsing XML documents 5-1
Overview . . . . . . . . . . . . . . . . . . . . . . 5-1
Step 1: Using the SAX Handler wizard . . . . . . 5-2
Step 2: Editing the SAX parser. . . . . . . . . . . 5-3
Step 3: Running the program . . . . . . . . . . . 5-5
Step 4: Adding attributes. . . . . . . . . . . . . . 5-6
Source code for MySaxParser.java . . . . . . . . 5-8
Chapter 6
Tutorial: DTD databinding with
BorlandXML 6-1
Overview . . . . . . . . . . . . . . . . . . . . . . 6-1
Step 1: Generating Java classes from a DTD . . . 6-2
Step 2: Unmarshalling the data . . . . . . . . . . 6-4
Step 3: Adding an employee . . . . . . . . . . . . 6-5
Step 4: Modifying an employee . . . . . . . . . . 6-6
Step 5: Running the completed application . . . 6-7
Chapter 3
Using JBuilder’s XML database
components 3-1
Using the template-based components . . . . . 3-2
Setting properties for the template beans . . 3-2
Using the component’s customizer . . . . 3-2
Using the Inspector . . . . . . . . . . . . . 3-8
XML query document . . . . . . . . . . . 3-8
i
Chapter 7
Tutorial: Schema databinding
with Castor 7-1
Overview . . . . . . . . . . . . . . . . . . . . . . 7-1
Step 1: Generating Java classes from a
schema. . . . . . . . . . . . . . . . . . . . . . . 7-2
Step 2: Unmarshalling the data. . . . . . . . . . 7-4
Step 3: Adding an employee . . . . . . . . . . . 7-5
Step 4: Modifying the new employee data . . . 7-6
Step 5: Running the completed application . . . 7-7
Transferring data from a database
table to an XML document . . . . . . . 8-10
Using XMLDBMSQuery’s customizer . . . 8-14
Selecting a JDBC connection . . . . . . . 8-14
Transferring data with a SQL
statement . . . . . . . . . . . . . . . . . 8-14
Map files for the XMLDBMSQuery
component . . . . . . . . . . . . . . . . 8-15
Chapter 9
Tutorial: Transferring data with the
template-based XML
database components 9-1
Getting started . . . . . . . . . . . . . . . . . . . 9-2
Working with the sample test application . . . . 9-2
Using XTable’s customizer . . . . . . . . . . . 9-3
Entering JDBC connection
information . . . . . . . . . . . . . . . . . 9-3
Transferring data from the database
table to an XML document . . . . . . . . 9-4
Using XQuery’s customizer . . . . . . . . . . 9-6
Selecting a JDBC connection . . . . . . . . 9-7
Transferring data with a SQL
statement . . . . . . . . . . . . . . . . . . 9-7
Chapter 8
Tutorial: Transferring data with
the model-based XML
database components 8-1
Getting started . . . . . . . . . . . . . . . . . . . 8-2
Creating the map and SQL script files . . . . . . 8-3
Entering JDBC connection information . . . 8-4
Testing the connection . . . . . . . . . . . 8-5
Specifying the file names . . . . . . . . . . . 8-5
Creating the database table(s) . . . . . . . . . . 8-6
Working with the sample test application. . . . 8-8
Using XMLDBMSTable’s customizer. . . . . 8-8
Selecting a JDBC connection . . . . . . . . 8-9
Transferring data from an XML
document to the database table . . . . . 8-9
Index
I-1
ii
1
Chapter
Introduction
Chapter1
The
XML Application Developer’s Guide
explains how to use JBuilder’s XML
features and contains the following chapters:
• Chapter 2, “Using JBuilder’s XML features”
Explains how to use JBuilder’s XML features for creating, validating,
and presenting XML documents.
XML support is a feature
of JBuilder Professional
and Enterprise.
Also includes “Programmatic manipulation of XML” on page 2-17,
which explains how to create a SAX parser and manipulate your XML
data programmatically using several databinding solutions.
This is a feature of
JBuilder Enterprise.
• Chapter 3, “Using JBuilder’s XML database components”
Explains how to use the XML model and template bean components for
database queries and transfer of data between XML documents and
databases.
• Tutorials
• Chapter 4, “Tutorial: Validating and transforming XML documents”
This is a feature of
JBuilder Enterprise.
• Chapter 5, “Tutorial: Creating a SAX Handler for parsing XML
documents”
• Chapter 6, “Tutorial: DTD databinding with BorlandXML”
• Chapter 7, “Tutorial: Schema databinding with Castor”
• Chapter 8, “Tutorial: Transferring data with the model-based XML
database components”
• Chapter 9, “Tutorial: Transferring data with the template-based
XML database components”
These tutorials are
available in JBuilder
Enterprise.
1-1
Introduction
Plik z chomika:
rekin_80
Inne pliki z tego folderu:
Marchal - XML By Example.pdf
(5896 KB)
XML Application Developer's Guide.pdf
(1356 KB)
XML in 24 hours (html).pdf
(9705 KB)
XSL Specification.pdf
(5449 KB)
Inne foldery tego chomika:
algorytmy
grafika
języki programowania
PostgreSQL
programowanie obiektowe
Zgłoś jeśli
naruszono regulamin