30 #ifndef CPL_MINIXML_H_INCLUDED 31 #define CPL_MINIXML_H_INCLUDED 124 const char *pszPath );
125 #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS) 130 const char *pszPath ) {
132 const_cast<CPLXMLNode*>(poRoot), pszPath));
138 const char *pszTarget );
139 #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS) 144 const char *pszTarget ) {
146 const_cast<CPLXMLNode*>(poRoot), pszTarget));
153 const char *pszDefault );
156 const char *pszText );
174 const char *pszNameSpace,
180 const char *pszFilename );
184 #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS) 193 struct CPLXMLTreeCloserDeleter
207 std::unique_ptr<
CPLXMLNode, CPLXMLTreeCloserDeleter>(data) {}
CPLXMLNode * CPLCreateXMLNode(CPLXMLNode *poParent, CPLXMLNodeType eType, const char *pszText)
Create an document tree item.
Definition: cpl_minixml.cpp:1297
void CPLAddXMLAttributeAndValue(CPLXMLNode *psParent, const char *pszName, const char *pszValue)
Create an attribute and text value.
Definition: cpl_minixml.cpp:1890
Definition: cpl_minixml.h:47
CPLXMLNode * CPLParseXMLFile(const char *pszFilename)
Parse XML file into tree.
Definition: cpl_minixml.cpp:2131
Document node structure.
Definition: cpl_minixml.h:66
int CPLRemoveXMLChild(CPLXMLNode *psParent, CPLXMLNode *psChild)
Remove child node from parent.
Definition: cpl_minixml.cpp:1763
Core portability definitions for CPL.
#define CPL_C_START
Macro to start a block of C symbols.
Definition: cpl_port.h:337
Definition: cpl_minixml.h:46
void CPLAddXMLSibling(CPLXMLNode *psOlderSibling, CPLXMLNode *psNewSibling)
Add new sibling.
Definition: cpl_minixml.cpp:1808
int CPLSetXMLValue(CPLXMLNode *psRoot, const char *pszPath, const char *pszValue)
Set element value by path.
Definition: cpl_minixml.cpp:1969
CPLXMLNode * CPLSearchXMLNode(CPLXMLNode *poRoot, const char *pszTarget)
Search for a node in document.
Definition: cpl_minixml.cpp:1468
const char * CPLGetXMLValue(const CPLXMLNode *poRoot, const char *pszPath, const char *pszDefault)
Fetch element/attribute value.
Definition: cpl_minixml.cpp:1645
void CPLStripXMLNamespace(CPLXMLNode *psRoot, const char *pszNameSpace, int bRecurse)
Strip indicated namespaces.
Definition: cpl_minixml.cpp:2061
char * CPLSerializeXMLTree(const CPLXMLNode *psNode)
Convert tree into string document.
Definition: cpl_minixml.cpp:1252
void CPLAddXMLChild(CPLXMLNode *psParent, CPLXMLNode *psChild)
Add child node to parent.
Definition: cpl_minixml.cpp:1707
CPLXMLNodeType eType
Node type.
Definition: cpl_minixml.h:74
struct CPLXMLNode CPLXMLNode
Document node structure.
CPLXMLNode * CPLParseXMLString(const char *)
Parse an XML string into tree form.
Definition: cpl_minixml.cpp:614
Definition: cpl_minixml.h:50
int CPLSerializeXMLTreeToFile(const CPLXMLNode *psTree, const char *pszFilename)
Write document tree to a file.
Definition: cpl_minixml.cpp:2169
Definition: cpl_minixml.h:48
CPLXMLNode * CPLCloneXMLTree(const CPLXMLNode *psTree)
Copy tree.
Definition: cpl_minixml.cpp:1914
Manage a tree of XML nodes so that all nodes are freed when the instance goes out of scope...
Definition: cpl_minixml.h:202
void CPLDestroyXMLNode(CPLXMLNode *)
Destroy a tree.
Definition: cpl_minixml.cpp:1412
struct CPLXMLNode * psNext
Next sibling.
Definition: cpl_minixml.h:106
CPLXMLTreeCloser(CPLXMLNode *data)
Constructor.
Definition: cpl_minixml.h:206
CPLXMLNodeType
XML node type.
Definition: cpl_minixml.h:44
Definition: cpl_minixml.h:49
void CPLCleanXMLElementName(char *)
Make string into safe XML token.
Definition: cpl_minixml.cpp:2240
CPLXMLNode * CPLGetXMLNode(CPLXMLNode *poRoot, const char *pszPath)
Find node by path.
Definition: cpl_minixml.cpp:1557
char * pszValue
Node value.
Definition: cpl_minixml.h:97
#define CPL_C_END
Macro to end a block of C symbols.
Definition: cpl_port.h:339
struct CPLXMLNode * psChild
Child node.
Definition: cpl_minixml.h:118
CPLXMLNode * CPLCreateXMLElementAndValue(CPLXMLNode *psParent, const char *pszName, const char *pszValue)
Create an element and text value.
Definition: cpl_minixml.cpp:1851