UniSet 2.44.3
Класс uniset::UniXML
Граф связей класса uniset::UniXML:

Классы

struct  UniXMLDocDeleter

Открытые типы

typedef UniXML_iterator iterator
typedef UniXMLPropList PropList

Открытые члены

 UniXML (const std::string &filename)
xmlNode * getFirstNode () noexcept
xmlNode * getFirstNode () const noexcept
iterator begin () noexcept
iterator end () noexcept
void open (const std::string &filename)
bool isOpen () const noexcept
void close ()
std::string getFileName () const noexcept
void createFromText (const std::string &text)
void newDoc (const std::string &root_node, const std::string &xml_ver="1.0")
bool save (const std::string &filename="", int level=2)
xmlNode * findNode (xmlNode *node, const std::string &searchnode, const std::string &name="") const
xmlNode * extFindNode (xmlNode *node, int depth, int width, const std::string &searchnode, const std::string &name="", bool top=true) const
xmlNode * findNodeLevel1 (xmlNode *root, const std::string &nodename, const std::string &nm="") const

Открытые статические члены

static std::string getProp (const xmlNode *node, const std::string &name) noexcept
static std::string getProp2 (const xmlNode *node, const std::string &name, const std::string &defval="") noexcept
static std::string getPropOrProp (const xmlNode *node, const std::string &name1, const std::string &name2) noexcept
 Get property by name1, if empty - try name2.
static int getIntProp (const xmlNode *node, const std::string &name) noexcept
static int getPIntProp (const xmlNode *node, const std::string &name, int def) noexcept
 if value if not positive ( <= 0 ), returns def
static void setProp (xmlNode *node, const std::string &name, const std::string &text)
static UniXMLPropList getPropList (xmlNode *node)
static xmlNode * createChild (xmlNode *node, const std::string &title, const std::string &text)
static xmlNode * createNext (xmlNode *node, const std::string &title, const std::string &text)
static xmlNode * insertNext (xmlNode *node, const std::string &title, const std::string &text)
static void removeNode (xmlNode *node)
 Удаление указанного узла со всеми вложенными
static xmlNode * copyNode (xmlNode *node, int recursive=1)
static xmlNode * nextNode (xmlNode *node)

Защищенные данные

std::string filename
std::unique_ptr< xmlDoc, UniXMLDocDeleterdoc

Методы

◆ begin()

UniXML::iterator UniXML::begin ( )
noexcept

возвращает итератор на самый первый узел документа

◆ copyNode()

xmlNode * UniXML::copyNode ( xmlNode * node,
int recursive = 1 )
static

◆ getPIntProp()

int UniXML::getPIntProp ( const xmlNode * node,
const std::string & name,
int def )
staticnoexcept

if value if not positive ( <= 0 ), returns def

◆ getPropOrProp()

string UniXML::getPropOrProp ( const xmlNode * node,
const std::string & name1,
const std::string & name2 )
staticnoexcept

Get property by name1, if empty - try name2.

◆ removeNode()

void UniXML::removeNode ( xmlNode * node)
static

Удаление указанного узла со всеми вложенными