OpenShot Library | OpenShotAudio  0.2.1
juce::XmlElement::TextFormat Struct Reference

A struct containing options for formatting the text when representing an XML element as a string. More...

#include <juce_XmlElement.h>

Public Member Functions

 TextFormat ()
 Default constructor. More...
 
TextFormat singleLine () const
 returns a copy of this format with newLineChars set to nullptr. More...
 
TextFormat withoutHeader () const
 returns a copy of this format with the addDefaultHeader flag set to false. More...
 

Public Attributes

String dtd
 If supplied, this DTD will be added to the document. More...
 
String customHeader
 If supplied, this header will be used (and customEncoding & addDefaultHeader will be ignored). More...
 
String customEncoding
 If not empty and addDefaultHeader is true, this will be set as the encoding. More...
 
bool addDefaultHeader = true
 If true, a default header will be generated; otherwise just bare XML will be emitted. More...
 
int lineWrapLength = 60
 A maximum line length before wrapping is done. More...
 
const char * newLineChars = "\r\n"
 Allows the newline characters to be set. More...
 

Detailed Description

A struct containing options for formatting the text when representing an XML element as a string.

Definition at line 194 of file juce_XmlElement.h.

Constructor & Destructor Documentation

◆ TextFormat()

juce::XmlElement::TextFormat::TextFormat ( )

Default constructor.

Definition at line 336 of file juce_XmlElement.cpp.

Member Function Documentation

◆ singleLine()

XmlElement::TextFormat juce::XmlElement::TextFormat::singleLine ( ) const

returns a copy of this format with newLineChars set to nullptr.

Definition at line 338 of file juce_XmlElement.cpp.

References newLineChars.

Referenced by juce::PropertySet::setValue().

◆ withoutHeader()

XmlElement::TextFormat juce::XmlElement::TextFormat::withoutHeader ( ) const

returns a copy of this format with the addDefaultHeader flag set to false.

Definition at line 345 of file juce_XmlElement.cpp.

References addDefaultHeader.

Referenced by juce::PropertySet::setValue().

Member Data Documentation

◆ dtd

String juce::XmlElement::TextFormat::dtd

If supplied, this DTD will be added to the document.

Definition at line 199 of file juce_XmlElement.h.

Referenced by juce::XmlElement::writeTo().

◆ customHeader

String juce::XmlElement::TextFormat::customHeader

If supplied, this header will be used (and customEncoding & addDefaultHeader will be ignored).

Definition at line 200 of file juce_XmlElement.h.

Referenced by juce::XmlElement::writeTo().

◆ customEncoding

String juce::XmlElement::TextFormat::customEncoding

If not empty and addDefaultHeader is true, this will be set as the encoding.

Otherwise, a default of "UTF-8" will be used

Definition at line 201 of file juce_XmlElement.h.

Referenced by juce::XmlElement::writeTo().

◆ addDefaultHeader

bool juce::XmlElement::TextFormat::addDefaultHeader = true

If true, a default header will be generated; otherwise just bare XML will be emitted.

Definition at line 202 of file juce_XmlElement.h.

Referenced by withoutHeader(), and juce::XmlElement::writeTo().

◆ lineWrapLength

int juce::XmlElement::TextFormat::lineWrapLength = 60

A maximum line length before wrapping is done.

(If newLineChars is nullptr, this is ignored)

Definition at line 203 of file juce_XmlElement.h.

Referenced by juce::XmlElement::writeTo().

◆ newLineChars

const char* juce::XmlElement::TextFormat::newLineChars = "\r\n"

Allows the newline characters to be set.

If you set this to nullptr, then the whole XML document will be placed on a single line.

Definition at line 204 of file juce_XmlElement.h.

Referenced by singleLine(), and juce::XmlElement::writeTo().


The documentation for this struct was generated from the following files: