TSDuck Version 3.20-1669 (TSDuck - The MPEG Transport Stream Toolkit)
ts::xml Namespace Reference

Namespace for XML classes. More...

Classes

class  Attribute
 Attribute of an XML element. More...
 
class  Comment
 Comment in an XML document. More...
 
class  Declaration
 Declaration in an XML document. More...
 
class  Document
 Representation of an XML document. More...
 
class  Element
 Structured element in an XML document. More...
 
class  Node
 Base class for all XML objects in a document. More...
 
class  Text
 Text element in an XML document. More...
 
class  Tweaks
 Global tweaks to manipulate, parse and format XML documents. More...
 
class  Unknown
 Unknown element in an XML document. More...
 

Typedefs

typedef std::vector< const Element * > ElementVector
 Vector of constant elements.
 

Variables

static const size_t UNLIMITED = std::numeric_limits<size_t>::max()
 Specify an unlimited number of elements.
 

Detailed Description

Namespace for XML classes.

The XML features of TSDuck are freely inspired from TinyXML-2, a simple and lightweight XML library originally developed by Lee Thomason.

TSDuck used to embed TinyXML-2 in the past but no longer does to allow more specialized operations. This set of classes is probably less fast than TinyXML-2 but TSDuck does not manipulate huge XML files. So, this should be OK.

Among the differences between TinyXML-2 and this set of classes:

  • Uses Unicode strings from the beginning.
  • Error reporting using ts::Report.
  • Case-insensitive search of names and attributes.
  • Getting values and attributes with cardinality and value bounds checks.
  • Print / format any subset of a document.
  • XML document validation using a template.