technologies. Oracle provides a rich Java application program interface (API) for data- base access and XML. You’ll use these when extending XSQL with action handlers and serializers, and also when using XSQL from inside programs. You can also use Oracle JDeveloper to help you develop your XSQL pages. This section looks at the core tech- nologies and how they relate to XSQL. Oracle Text SQL is great when the data is structured, like accounts receivable or inventory. A lot of data, however, is unstructured text. Searching text is different than searching records in a database. When searching text, you want to know if keywords occur in the text and how they occur. SQL, on the other hand, is used mainly to see if a record matches to a particular  term.  Oracle  Text  bridges  the  gap  by  allowing  you  to  perform  complex unstructured text searches inside SQL statements. Because Oracle Text is tightly integrated with Oracle SQL, you can use it from any other SQL statement in your XSQL pages. XML Support XML is a fantastic way to store and transport data. However, it doesn’t exist in isolation. If you are writing a program that consumes XML, you need to be able to parse, create, and update XML documents. If you want to store XML, you’ll quickly run into prob- lems if you strictly try to store XML as files. Multithreaded applications don’t interact well with flat files. What if two users are trying to write to the file at the same time? Oracle provides a variety of tools to help you in the brave new world of XML. Oracle provides an XML parser and XSLT processor. These are used by the XSQL servlet in the simple model, but you can use them directly in your applications, too. These tools are part of the XML Developer’s Kit (XDK), which includes a robust set of classes that allow  you  to  interface  with  XML  in  your  code.  Both  the  Document  Object  Model (DOM) and Simple API for XML (SAX) APIs are fully supported. In addition, you get a lot of additional methods to make your life easier. These APIs are covered in depth in Chapter 17. This takes care of handling XML programmatically, but what about storing docu- ments? New to Oracle 9i, you can store XML documents directly in the database using the XmlType. This is an object type and takes advantage of the object-relational capa- bilities of Oracle. Once in the database, you can use XPath, the XML search language, to search XML and extract data from inside the documents. The searching of XML is integrated with Oracle Text, so you can do complex text searches on an entire XML doc- ument or just certain nodes inside the XML document. All of these capabilities are inte- grated with Oracle SQL and are accessible from XSQL pages. You’ll learn more about this capability in Chapter 11. Oracle is already the best relational database on the market. Now, it is in step with the latest advances in XML. Not only can you store and search XML inside the database, you can also handle XML programmatically using Oracle-supported APIs. Throughout the book, you’ll see how well Oracle is integrated with XML in all of its forms. 12 Chapter 1 271209 Ch01.F  12/9/02  2:00 PM  Page 12