TSDuck v3.46-4930
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::xml Namespace Reference

Classes

class  Attribute
class  Comment
class  Declaration
class  Document
class  Element
class  JSONConverter
class  ModelDocument
class  Node
class  PatchDocument
class  RunningDocument
class  Text
class  Tweaks
class  Unknown

Typedefs

using ElementVector = std::vector<const Element*>

Enumerations

enum class  MergeAttributes {
  MergeAttributes::NONE ,
  MergeAttributes::ADD ,
  MergeAttributes::REPLACE
}

Variables

static constexpr size_t DEFAULT_MAX_NESTED = 256
static constexpr size_t UNLIMITED = std::numeric_limits<size_t>::max()

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.