Книга: Learning GNU Emacs, 3rd Edition
8.4 Writing XML
Writing XML involves entering structured information that complies with a document type definition or schema. Even within Emacs, the XML support you receive varies. At the low end of the spectrum, there is plain vanilla Fundamental mode. It provides simply a screen where you type. Specialized modes like SGML mode provide support for entering tags, as we saw earlier in our discussion of HTML mode, a derivative of SGML mode. But neither of these approaches help you parse or validate XML (SGML mode has a command for validating, but it is tricky to set up correctly). More advanced Lisp packages, though currently not included in Emacs, are available to provide these functions. These add-on packages provide validation against DTDs or schemas, parsing capabilities, and, typically, an array of standard DTDs and schema definitions. In Emacs, these tools primarily work in conjunction with one of two major modes. psgml mode validates XML (and SGML) against DTDs. The newer nxml mode validates against RELAX NG schemas. We cover both of these options in this section. Before we go into detail on those modes, however, let's look briefly what Emacs has built-in with SGML mode.
- Листинг 14.2. Использование параметра XMLWriteMode при сохранении объекта ADO.NET DataSet
- 8.4.3 Writing XHTML Using nxml Mode
- Хранение данных в виде XML-файлов на устройстве
- Другие возможности XML
- Соображения, побуждающие избегать использования однонаправленной обработки XML-данных
- ГЛАВА 10 Производительность и XML
- Библиотеки XML
- XML или не XML?
- Сравнение XML с другими текстовыми форматами
- Иерархическая структура XML-данных
- Простой пример, иллюстрирующий применение модели XML DOM и однонаправленного чтения-записи XML-документов
- 8.4.1 Writing XML with SGML Mode