Xml 简明教程
XML - Processors
当软件程序读取 XML 文档并相应采取操作时,这称为处理 XML。能读取和处理 XML 文档的任何程序都称为 XML 处理器。XML 处理器读取 XML 文件并将其转换为程序其他部分可访问的在内存结构中。
When a software program reads an XML document and takes actions accordingly, this is called processing the XML. Any program that can read and process XML documents is known as an XML processor. An XML processor reads the XML file and turns it into in-memory structures that the rest of the program can access.
最基本的 XML 处理器读取 XML 文档并将其转换为供其他程序或子例程使用的内部表示。这称为解析器,它是每个 XML 处理程序的重要组成部分。
The most fundamental XML processor reads an XML document and converts it into an internal representation for other programs or subroutines to use. This is called a parser, and it is an important component of every XML processing program.
处理器涉及处理说明,这可以在章节 Processing Instruction 中研究。
Processor involves processing the instructions, that can be studied in the chapter Processing Instruction.
Types
XML 处理器根据是否检查 XML 文档的有效性分为 validating 或 non-validating 类型。发现有效性错误的处理器必须能够报告此错误,但可以继续正常处理。
XML processors are classified as validating or non-validating types, depending on whether or not they check XML documents for validity. A processor that discovers a validity error must be able to report it, but may continue with normal processing.
A few validating parsers are − xml4c(IBM,在 C++ 中)、xml4j(IBM,在 Java 中)、MSXML(Microsoft,在 Java 中)、TclXML(TCL)、xmlproc(Python)、XML::Parser(Perl)、Java Project X(Sun,在 Java 中)。
A few validating parsers are − xml4c (IBM, in C++), xml4j (IBM, in Java), MSXML (Microsoft, in Java), TclXML (TCL), xmlproc (Python), XML::Parser (Perl), Java Project X (Sun, in Java).
A few non-validating parsers are − OpenXML(Java)、Lark(Java)、xp(Java)、AElfred(Java)、expat ©、XParse(JavaScript)、xmllib(Python)。
A few non-validating parsers are − OpenXML (Java), Lark (Java), xp (Java), AElfred (Java), expat ©, XParse (JavaScript), xmllib (Python).