sptk2 logo
SPTK Home Page
Public Types | Public Member Functions | List of all members
sptk::xdoc::ImportXML Class Reference

#include <ImportXML.h>

Public Types

enum class  Mode : uint8_t { Compact , KeepFormatting }
 

Public Member Functions

 ImportXML ()=default
 
XMLDocTypedocType ()
 
void indentSpaces (int i)
 
void parse (const SNode &node, const char *_buffer, Mode formatting=Mode::Compact)
 

Detailed Description

XML document.

Represents the entire XML document. It provides access to document root node, which includes all nodes in XML document tree.

Member Enumeration Documentation

◆ Mode

enum class sptk::xdoc::ImportXML::Mode : uint8_t
strong
Enumerator
Compact 

Strip any XML formatting, store #text nodes directly into Nodes.

KeepFormatting 

Keep any #text nodes.

Constructor & Destructor Documentation

◆ ImportXML()

sptk::xdoc::ImportXML::ImportXML ( )
default

Constructs an empty document, without doctype.

Member Function Documentation

◆ docType()

XMLDocType & sptk::xdoc::ImportXML::docType ( )
inline

Return doctype of document.

◆ indentSpaces()

void sptk::xdoc::ImportXML::indentSpaces ( int  i)
inline

Set indentation in save, defaults to 2

Parameters
iNew indent spaces

◆ parse()

void sptk::xdoc::ImportXML::parse ( const SNode &  node,
const char *  _buffer,
Mode  formatting = Mode::Compact 
)

Load document from buffer.

Parameters
_bufferSource buffer

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

Fri Oct 14 2022 09:58:49: SPTK 5.4.1