Combining DTML and XML Resources

Zope itself doesn't understand XML (except when importing a previous Zope object export in XML format), but that doesn't mean that you can't work with XML and other formats. For example, you can use the built-in features of DTML and Zope to export a DTML resource in XML format. For this, you first need to have a Zope project to work with for our examples in this entire chapter, you'll be working with a very simple logging project that allows you to enter a title and message, which is logged...

The XML Tools Dictionary

As with most AppleScript extensions, you can get more information and examples about the XML Tools by opening the XML Tools dictionary in your AppleScript editor. For example, using the standard Script Editor application (in the AppleScript directory of the Apple Extras directory on your hard disk), select File Open Dictionary and find the XML Tools extension. You should get a window like the one shown in Figure 23.4. Late Night Software also provides an XML-RPC extension that enables you to...

XML Character Set Names

Unicode itself really only supports two different character sets UTF-8 and UTF-16. In addition, a number of different existing character sets ratified by the ISO also exist and are supported by most XML parsers. The exact list of character sets supported depends on your parser, but all should support the basic Unicode sets as well as the ISO-8859-1 set. UTF-8 and ISO-8859-1 match the ASCII set for the first 127 characters. In essence, if you need access to a full range of characters from all...

XML Solutions in Python

Python's XML support is probably one of the most complex of the different solutions available, largely because of the way in which the different XML parsers have been developed. The original XML parsing system provided with Python 1.5.2 is called xmllib, and it comes as standard with all Python distributions. xmllib was developed on the same basis as the sgm-llib module, which provides SGML parsing tools. The xmllib parser is both a simple validation parser and an event-driven data parser that...

Using xmlproc for Validation

When working with any kind of XML document, there are always issues relating to the validity of the document being parsed. Most of the parsers will check a document for well-formedness, including SAX, which is used both directly and for building the DOM object model for the Python DOM implementation, and Expat. This involves simply checking that start tags have corresponding end tags and that tags don't overlap each other (start and end tags in different orders). These basic checks are...

Tcl and Unicode

The TclXML parser will read Unicode encoded documents directly, so you need to identify or display either entities or character data. Then you will need to be able to translate between Unicode formats. Tcl 8.1 and after includes the encoding command, which will convert strings between the different encoding formats for you. See the following sidebar for information on determining which encodings are supported by your system. To determine which encodings are supported by your Tcl installation,...