Read and write XML¶
-
enum
xml
::
ParserOptions
¶ Representation of available options to influence the behaviour of the XML parser.
ParserOptions
satisfies the requirements of BitmaskType.This means that the bitwise operators (e.g.
operator|
oroperator&
) are defined for this type. Thus options may be combined byOR
-ing the respective values.- Note
- No options have been implemented so far. As soon as this is done, provide an usage example, a list describing the member constants (options) and which options can be combined. Refer to std::filesystem::copy_options for an example.
Values:
-
none
= 0x0¶ default behaviour
-
enum
xml
::
WriterOptions
¶ Representation of available options to influence the behaviour of the XML writer.
WriterOptions
satisfies the requirements of BitmaskType.This means that the bitwise operators (e.g.
operator|
oroperator&
) are defined for this type. Thus options may be combined byOR
-ing the respective values.Available options
At most one writer option in each of the following options groups may be present, otherwise the behavior is undefined.
Values:
-
none
= 0x0 default behaviour
-
itu_structure
= 0x1¶ use ITU xml structure
-
write_default_values
= 0x2¶ write default values
-
-
std::shared_ptr<Document>
adm
::
parseXml
(const std::string &filename, xml::ParserOptions options = xml::ParserOptions::none)¶ Parse an XML representation of the Audio Definition Model.
Convenience wrapper for files using
parseXml(std::istream&)
- Parameters
filename
: XML file to parseoptions
: Options to influence the XML parser behaviour
-
std::shared_ptr<Document>
adm
::
parseXml
(std::istream &stream, xml::ParserOptions options = xml::ParserOptions::none)¶ Parse an XML representation of the Audio Definition Model.
Read adm data from an
std::istream
.- Parameters
stream
: input stream to read XML dataoptions
: Options to influence the XML parser behaviour
Write an Document.
Convenience wrapper for files using
writeXml(std::ostream&, std::shared_ptr<const Document>)
- Parameters
filename
: XML file to write toadmDocument
: ADM document that should be transformed into XMLoptions
: Options to influence the XML generator behaviour
Write an Document to an output stream.
- Parameters
stream
: output stream to write XML dataadmDocument
: ADM document that should be transformed into XMLoptions
: Options to influence the XML generator behaviour