System::Xml::XmlTextWriter class
Contents
[
Hide
]XmlTextWriter class
Represents a writer that provides a fast, non-cached, forward-only way of generating streams or files containing XML data that conforms to the W3C Extensible Markup Language (XML) 1.0 and the Namespaces in XML recommendations.
class XmlTextWriter : public System::Xml::XmlWriter
Methods
Method | Description |
---|---|
Close() override | Closes this stream and the underlying stream. |
Flush() override | Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. |
get_BaseStream() | Returns the underlying stream object. |
get_Formatting() | Indicates how the output is formatted. |
get_Indentation() | Returns how many IndentChars to write for each level in the hierarchy when XmlTextWriter::set_Formatting is set to Formatting::Indented. |
get_IndentChar() | Returns which character to use for indenting when XmlTextWriter::set_Formatting is set to Formatting::Indented. |
get_Namespaces() | Returns a value indicating whether to do namespace support. |
get_QuoteChar() | Returns which character to use to quote attribute values. |
get_WriteState() override | Returns the state of the writer. |
get_XmlLang() override | Returns the current xml:lang scope. |
get_XmlSpace() override | Returns an XmlSpace representing the current xml:space scope. |
LookupPrefix(String) override | Returns the closest prefix defined in the current namespace scope for the namespace URI. |
set_Formatting(System::Xml::Formatting) | Indicates how the output is formatted. |
set_Indentation(int32_t) | Sets how many IndentChars to write for each level in the hierarchy when XmlTextWriter::set_Formatting is set to Formatting::Indented. |
set_IndentChar(char16_t) | Sets which character to use for indenting when XmlTextWriter::set_Formatting is set to Formatting::Indented. |
set_Namespaces(bool) | Sets a value indicating whether to do namespace support. |
set_QuoteChar(char16_t) | Sets which character to use to quote attribute values. |
WriteBase64(ArrayPtr<uint8_t>, int32_t, int32_t) override | Encodes the specified binary bytes as base64 and writes out the resulting text. |
WriteBinHex(ArrayPtr<uint8_t>, int32_t, int32_t) override | Encodes the specified binary bytes as binhex and writes out the resulting text. |
WriteCData(String) override | Writes out a … block containing the specified text. |
WriteCharEntity(char16_t) override | Forces the generation of a character entity for the specified Unicode character value. |
WriteChars(ArrayPtr<char16_t>, int32_t, int32_t) override | Writes text one buffer at a time. |
WriteComment(String) override | Writes out a comment **** containing the specified text. |
WriteDocType(const String&, const String&, const String&, const String&) override | Writes the DOCTYPE declaration with the specified name and optional attributes. |
WriteEndAttribute() override | Closes the previous XmlTextWriter::WriteStartAttribute call. |
WriteEndDocument() override | Closes any open elements or attributes and puts the writer back in the Start state. |
WriteEndElement() override | Closes one element and pops the corresponding namespace scope. |
WriteEntityRef(const String&) override | Writes out an entity reference as &name;. |
WriteFullEndElement() override | Closes one element and pops the corresponding namespace scope. |
WriteName(const String&) override | Writes out the specified name, ensuring it is a valid name according to the W3C XML 1.0 recommendation. |
WriteNmToken(const String&) override | Writes out the specified name, ensuring it is a valid NmToken according to the W3C XML 1.0 recommendation. |
WriteProcessingInstruction(String, String) override | Writes out a processing instruction with a space between the name and text as follows: . |
WriteQualifiedName(const String&, const String&) override | Writes out the namespace-qualified name. This method looks up the prefix that is in scope for the given namespace. |
WriteRaw(ArrayPtr<char16_t>, int32_t, int32_t) override | Writes raw markup manually from a character buffer. |
WriteRaw(const String&) override | Writes raw markup manually from a string. |
WriteStartAttribute(const String&, const String&, const String&) override | Writes the start of an attribute. |
WriteStartDocument() override | Writes the XML declaration with the version “1.0”. |
WriteStartDocument(bool) override | Writes the XML declaration with the version “1.0” and the standalone attribute. |
WriteStartElement(const String&, const String&, const String&) override | Writes the specified start tag and associates it with the given namespace and prefix. |
WriteString(const String&) override | Writes the given text content. |
WriteSurrogateCharEntity(char16_t, char16_t) override | Generates and writes the surrogate character entity for the surrogate character pair. |
WriteWhitespace(String) override | Writes out the given white space. |
XmlTextWriter(const SharedPtr<IO::Stream>&, const SharedPtr<Text::Encoding>&) | Creates an instance of the XmlTextWriter class using the specified stream and encoding. |
XmlTextWriter(const String&, const SharedPtr<Text::Encoding>&) | Creates an instance of the XmlTextWriter class using the specified file. |
XmlTextWriter(const SharedPtr<IO::TextWriter>&) | Creates an instance of the XmlTextWriter class using the specified TextWriter. |
Typedefs
Typedef | Description |
---|---|
Ptr | An alias for shared pointer to an instance of this class. |
Remarks
It is recommended to use the XmlWriter class instead.
Objects of this class should only be allocated using System::MakeObject() function. Never create instances of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.
See Also
- Class XmlWriter
- Namespace System::Xml
- Library Aspose.Page for C++