XML FAQs When developing XML solutions, several questions are asked repeatedly. Sometimes the answers are obvious, and other times they are more complex. Below are a few of the most frequently asked questions related to XML, as well as a few answers. WHAT'S THE EASIEST WAY TO VIEW XML FILES? One of the simplest ways to view XML documents is to use Microsoft's Internet Explorer Web browser. All releases of Internet Explorer from version 5 and up contain built-in technology for reading and parsing XML documents. By viewing an XML document in Internet Explorer, you can navigate the hierarchical document tree to view different parts of the document. HOW CAN I ACCESS XML DOCUMENTS FROM WITHIN MY JAVA APPLICATIONS? The most common method of accessing XML documents from Java applications is to use Sun Microsystems' Java API for XML (JAXP for short). JAXP provides all of the necessary functionality for parsing XML documents using both Document Object Model (DOM) and Simple API for XML (SAX). WHAT'S THE DIFFERENCE BETWEEN A DTD AND A SCHEMA? A Document Type Definition (DTD) is functionally similar to an XML Schema. The major difference is in the exact functionality that each provides. XML Schemas were developed to overcome some of the functionality that was lacking in DTDs, such as stronger type checking. The other difference is that DTDs use their own language to define a document type; Schemas use XML to define the elements of an XML document. ARE DTDs OR SCHEMAS REQUIRED TO PROCESS XML DOCUMENTS? The answer to this question depends on your application and circumstances. You can create and parse XML documents easily enough without a DTD or Schema; however, you have no validation that the element names are correct. By specifying a DTD or Schema, you gain the ability to not only verify that elements are named correctly but that other business rules can be met, such as correct data types. WE RECEIVE XML DATA FROM A CUSTOMER IN A CERTAIN FORMAT, BUT OUR APPLICATION REQUIRES SOMETHING DIFFERENT. HOW CAN WE SOLVE THIS? The best and easiest solution is to use eXtensible Stylesheet Language Transformation (XSLT). This technology allows you to create a template that defines how incoming XML data should be converted into a different format. SINCE XML DATA IS BASICALLY TEXT, HOW CAN I PROTECT XML DOCUMENTS TRANSMITTED ON THE INTERNET? There are two ways to protect XML data on the Internet. The first (and most mature) is to use VPN technology to create secure network links between the computers transmitting data. The second is to use some form of encryption. You can either encrypt the XML document using a variety of tools such as PGP, or you can take advantage of the XML specifications for signing and digitally encrypting your documents. Brian Schaffner is a senior consultant for DMR Consulting, a Fujitsu company. He provides architecture, design, and development support for DMR's Telcom360 group. ------------------------------------------