Qore XML Module  1.4.1
MakeXmlOpts Class Referencefinal

Classes

class  InvalidHash
 

Public Member Functions

 MakeXmlOpts ()
 

Static Public Member Functions

static MakeXmlOpts createFromFlags (int flags, const QoreEncoding *encoding=nullptr)
 
static MakeXmlOpts createFromHash (const QoreHashNode *hash)
 

Public Attributes

std::string m_docVersion
 xml document version as a string
 
const QoreEncoding * m_encoding
 encoding used for the output xml
 
bool m_formatWithWhitespaces
 True, if the output xml shall be formatted with white spaces.
 
bool m_useNumericRefs
 Use numeric character references instead of native characters for non-ascii character when generating XML.
 
std::string m_dateFormat
 format of dates when serializing into xml
 

Detailed Description

Wrapper for xml generating options.

Constructor & Destructor Documentation

◆ MakeXmlOpts()

MakeXmlOpts::MakeXmlOpts ( )
explicit

Constructs the wrapper with default options.

Member Function Documentation

◆ createFromFlags()

MakeXmlOpts MakeXmlOpts::createFromFlags ( int  flags,
const QoreEncoding *  encoding = nullptr 
)
static

Creates the wrapper with options filled from flags and passed encoding.

Parameters
flagsFormatting flags; see XML Generation Constants for more information.
encodingAn optional encoding for the output XML string
Returns
MakeXmlOpts with options parsed from flags and encoding, not specified fields are defaulted.

◆ createFromHash()

MakeXmlOpts MakeXmlOpts::createFromHash ( const QoreHashNode *  hash)
static

Creates the wrapper with options filled from hash.

Parameters
hashHash with formatting options; see XML Generation Options for more information about possible values.
Returns
MakeXmlOpts with options parsed from hash. Not specified options are defaulted. Unknown options are skipped.
Exceptions
InvalidHashin case that known option is invalid (unknown options are skipped).

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