DOM implementation.
More...
#include <base/xml/DOMImplementation.h>
Inherits Object.
|
enum | Flag {
WARNINGS = 1,
PEDANTIC = 2,
SUBSTITUTE_ENTITIES = 4,
DETECT_IDS = 8,
COMPLETE_ATTRIBUTE_LISTS = 16
} |
|
enum | Mode { PARSING,
VALIDATING,
RECOVERING
} |
|
|
| DOMImplementation () noexcept |
|
| DOMImplementation (const DOMImplementation ©) noexcept |
|
DOMImplementation & | operator= (const DOMImplementation &assign) noexcept |
|
bool | hasFeature (const String &name, const String &version) noexcept |
|
Document | createDocument (const String &version="1.0") |
|
Document | createDocument (DocumentType doctype, const String &version="1.0") |
|
Document | createDocument (const String &namespaceURI, const String &qualifiedName, DocumentType doctype, const String &version="1.0") |
|
Document | createFromURI (const String &systemId, Mode mode=VALIDATING, unsigned int flags=WARNINGS|PEDANTIC|DETECT_IDS|COMPLETE_ATTRIBUTE_LISTS) |
|
Document | createDocumentFromString (const String &value, Mode mode=VALIDATING, unsigned int flags=WARNINGS|PEDANTIC|DETECT_IDS|COMPLETE_ATTRIBUTE_LISTS) |
|
DocumentType | createDocumentType (const String &qualifiedName, const String &publicId, const String &systemId) |
|
void | saveDocument (Document document, const String &filename, bool indent=false) |
|
void | saveDocument (Document document, const String &filename, const String &encoding, bool indent) |
|
String | saveDocumentToMemory (Document document, bool spaces=false) |
|
String | saveDocumentToMemory (Document document, const String &encoding, bool spaces=false) |
|
◆ Mode
Enumerator |
---|
PARSING | Parsing without validation.
|
VALIDATING | Parsing with validation.
|
RECOVERING | Recovering mode.
|
◆ DOMImplementation()
DOMImplementation::DOMImplementation |
( |
| ) |
|
|
inlinenoexcept |
Initializes DOM implementation.
◆ createDocument() [1/3]
Creates a DOM Document object of the specified type with its document element.
- Parameters
-
namespaceURI | The namespace. May be improper. |
qualifiedName | The qualified name of the document element. |
doctype | The document type. |
version | The XML version. The default is "1.0". |
◆ createDocument() [2/3]
Document DOMImplementation::createDocument |
( |
const String & |
version = "1.0" | ) |
|
◆ createDocument() [3/3]
Creates a DOM Document object of the specified type.
- Parameters
-
doctype | The document type. |
version | The XML version. The default is "1.0". |
◆ createDocumentFromString()
Document DOMImplementation::createDocumentFromString |
( |
const String & |
value, |
|
|
Mode |
mode = VALIDATING , |
|
|
unsigned int |
flags = WARNINGS|PEDANTIC|DETECT_IDS|COMPLETE_ATTRIBUTE_LISTS |
|
) |
| |
Creates the document from a string.
- Parameters
-
value | The string. |
mode | The mode. |
flags | The flags. |
◆ createDocumentType()
◆ createFromURI()
Document DOMImplementation::createFromURI |
( |
const String & |
systemId, |
|
|
Mode |
mode = VALIDATING , |
|
|
unsigned int |
flags = WARNINGS|PEDANTIC|DETECT_IDS|COMPLETE_ATTRIBUTE_LISTS |
|
) |
| |
◆ hasFeature()
bool DOMImplementation::hasFeature |
( |
const String & |
name, |
|
|
const String & |
version |
|
) |
| |
|
noexcept |
Returns true if the feature is available.
◆ isSupported()
static bool DOMImplementation::isSupported |
( |
| ) |
|
|
staticnoexcept |
Returns true if XML is supported by the runtime.
◆ saveDocument() [1/2]
void DOMImplementation::saveDocument |
( |
Document |
document, |
|
|
const String & |
filename, |
|
|
bool |
indent = false |
|
) |
| |
Saves the document to the specified file.
- Parameters
-
filename | The path of the file. |
document | The document. |
indent | Specifies whether or not the document should be indented. The default is false. |
◆ saveDocument() [2/2]
void DOMImplementation::saveDocument |
( |
Document |
document, |
|
|
const String & |
filename, |
|
|
const String & |
encoding, |
|
|
bool |
indent |
|
) |
| |
Saves the document to the specified file.
- Parameters
-
filename | The path of the file. |
document | The document. |
encoding | The encoding. |
indent | Specifies whether or not the document should be indented. The default is false. |
◆ saveDocumentToMemory() [1/2]
String DOMImplementation::saveDocumentToMemory |
( |
Document |
document, |
|
|
bool |
spaces = false |
|
) |
| |
Saves the document to a string.
- Parameters
-
document | The document. |
spaces | Specifies whether or not formatting spaces should be added. The default is false. |
◆ saveDocumentToMemory() [2/2]
String DOMImplementation::saveDocumentToMemory |
( |
Document |
document, |
|
|
const String & |
encoding, |
|
|
bool |
spaces = false |
|
) |
| |
Saves the document to a string.
- Parameters
-
document | The document. |
encoding | The encoding. |
spaces | Specifies whether or not formatting spaces should be added. The default is false. |