#include <xml/macros/Utils.h>
◆ Attribute
| typedef std::pair<std::string, std::string> Attribute |
|
inherited |
◆ iterator
typedefs for backward compatibility
◆ const_iterator
◆ CopyableXMLDom() [1/3]
◆ CopyableXMLDom() [2/3]
◆ CopyableXMLDom() [3/3]
◆ operator=()
◆ reflect()
◆ clear()
Clears the whole content of this XMLDom document, i.e.
all nodes are destroyed and the XMLDom object has the same state as after calling it's constructor. Note: All iterators become invalid by calling this method. Accessing the iterators after calling this method will result in undefined behavior.
◆ clone()
Create and return a copy of the document.
◆ loadFromString()
| void loadFromString |
( |
const std::string & |
buffer | ) |
|
|
inherited |
Load and parse an XML document from memory.
- Exceptions
-
| XIO | if the document could not be loaded. |
- Parameters
-
◆ loadFromFile()
| void loadFromFile |
( |
const Path & |
filename, |
|
|
bool |
resolve = true |
|
) |
| |
|
inherited |
Load and parse an XML document from a file.
- Exceptions
-
| XFileNotFound | if file is not found. |
| XIO | if the file/document could not be loaded. |
- Parameters
-
| [in] | filename | The file name. |
| [in] | resolve | Should the filename be resolved (resolvePath())? Set to false if already resolved. |
◆ saveToFile() [1/2]
| void saveToFile |
( |
const Path & |
filename, |
|
|
const std::string & |
encoding = "UTF-8", |
|
|
bool |
resolve = true |
|
) |
| const |
|
inherited |
Save the XML document to a file.
- Exceptions
-
| XInvalidConfig | if the document is empty. |
| XIO | if the file could not be saved. |
- Parameters
-
| [in] | filename | The file name. |
| [in] | encoding | The desired encoding. |
| [in] | resolve | Should the filename be resolved (resolvePath())? Set to false if already resolved. |
◆ saveToFile() [2/2]
| void saveToFile |
( |
const Path & |
filename, |
|
|
bool |
resolve |
|
) |
| const |
|
inherited |
Save the XML document to a file, using encoding UTF-8.
- Exceptions
-
| XInvalidConfig | if the document is empty. |
| XIO | if the file could not be saved. |
- Parameters
-
| [in] | filename | The file name. |
| [in] | resolve | Should the filename be resolved (resolvePath())? Set to false if already resolved. |
◆ saveToString()
| std::string saveToString |
( |
const std::string & |
encoding = "UTF-8" | ) |
const |
|
inherited |
Save the XML document to a string.
- Exceptions
-
| XInvalidConfig | if the document is empty. |
| XIO | if the file could not be saved. |
- Parameters
-
| [in] | encoding | The desired encoding. |
- Returns
- The string containing the xml document
◆ croot()
Return a const sibling_iterator to the root node of the XML document.
◆ root() [1/2]
Return a const sibling_iterator to the root node of the XML document.
◆ root() [2/2]
Return a sibling_iterator to the root node of the XML document.
◆ uri()
| std::string uri |
( |
| ) |
const |
|
inherited |
Get the URL of the document (i.e.
the filename if loaded from file)
- Returns
- URL of the document
◆ setUri()
| void setUri |
( |
const std::string & |
uri | ) |
|
|
inherited |
Set the URL of the document (i.e.
the filename if loaded from file)
◆ encoding()
| std::string encoding |
( |
| ) |
const |
|
inherited |
Get the initial encoding of the document.
- Returns
- Encoding if any.
The documentation for this class was generated from the following file: