TinyXML
Encyclopedia
TinyXML is a small, simple XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

 parser for the C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

 language.
It is free and open source software
Free and open source software
Free and open-source software or free/libre/open-source software is software that is liberally licensed to grant users the right to use, study, change, and improve its design through the availability of its source code...

, distributed under the terms of the license of zlib/libpng.

Features

The principle impetus for TinyXML is its size, as the name suggests. It parses the XML into a DOM
Document Object Model
The Document Object Model is a cross-platform and language-independent convention for representing and interacting with objects in HTML, XHTML and XML documents. Aspects of the DOM may be addressed and manipulated within the syntax of the programming language in use...

-like tree. It can both read and write XML files.

Limitations

  • TinyXML does not process DTDs
    Document Type Definition
    Document Type Definition is a set of markup declarations that define a document type for SGML-family markup languages...

    , either internal or external. So XML files that rely upon DTD-defined entities will not parse correctly in TinyXML.

  • Though it does handle processing instruction
    Processing Instruction
    A Processing Instruction is an SGML and XML node type, which may occur anywhere in the document, intended to carry instructions to the application....

    s, it has no facilities for handling XSLT
    XSLT
    XSLT is a declarative, XML-based language used for the transformation of XML documents. The original document is not changed; rather, a new document is created based on the content of an existing one. The new document may be serialized by the processor in standard XML syntax or in another format,...

     stylesheet declarations. That is, it does not apply an XSLT declared in a stylesheet processing instruction to the XML file when parsing it.

  • Further, TinyXML has no facility for handling XML namespaces
    XML Namespace
    xmlns tagged XML namespaces are used for providing uniquely named elements and attributes in an XML document. They are defined in a W3C recommendation. An XML instance may contain element or attribute names from more than one XML vocabulary...

    . Qualified element or attribute names retain their prefixes, as TinyXML makes no effort to match the prefixes with namespaces.

  • In terms of encodings, it only handles files using UTF-8
    UTF-8
    UTF-8 is a multibyte character encoding for Unicode. Like UTF-16 and UTF-32, UTF-8 can represent every character in the Unicode character set. Unlike them, it is backward-compatible with ASCII and avoids the complications of endianness and byte order marks...

     or an unspecified form of ASCII similar to Latin-1
    ISO/IEC 8859-1
    ISO/IEC 8859-1:1998, Information technology — 8-bit single-byte coded graphic character sets — Part 1: Latin alphabet No. 1, is part of the ISO/IEC 8859 series of ASCII-based standard character encodings, first edition published in 1987. It is informally referred to as Latin-1. It is generally...

    .

External links

  • TinyXML Homepage
  • TinyXML++ which adds C++ concepts to TinyXML.
  • TinyXPath which adds XPath
    XPath
    XPath is a language for selecting nodes from an XML document. In addition, XPath may be used to compute values from the content of an XML document...

    syntax decoding to TinyXML in C++.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK