nlib
|
Abstract class that writes to an XML stream. More...
#include "nn/nlib/exi/XmlStreamWriter.h"
Public Member Functions | |
void | Flush () noexcept |
Flushes the XML writer cache. More... | |
void | WriteCData (const ExiChar *data) noexcept |
Writes the text specified as an argument. More... | |
void | WriteCharacters (const ExiChar *text) noexcept |
Writes the text specified as an argument. More... | |
void | WriteComment (const ExiChar *data) noexcept |
Writes the XML comment (<!--...--> ) containing text that was specified as an argument. More... | |
void | WriteProcessingInstruction (const ExiChar *target, const ExiChar *data) noexcept |
Writes a PI (processing instruction) like <?target data?> . More... | |
Writing XML Namespaces | |
const ExiChar * | GetPrefix (const ExiChar *uri) noexcept |
Gets the prefix corresponding to the namespace URI. More... | |
void | WriteNamespace (const ExiChar *prefix, const ExiChar *namespace_uri) noexcept |
Declares the XML namespace. More... | |
void | WriteDefaultNamespace (const ExiChar *namespace_uri) noexcept |
Declares the default namespace. More... | |
Writing XML Attributes | |
void | WriteAttribute (const ExiChar *local_name, const ExiChar *value) noexcept |
Writes an attribute and value without a namespace. More... | |
void | WriteAttribute (const ExiChar *prefix, const ExiChar *namespace_uri, const ExiChar *local_name, const ExiChar *value) noexcept |
Writes an attribute and value with a namespace. More... | |
Writing Opening and Closing Tags | |
void | WriteEmptyElement (const ExiChar *local_name) noexcept |
Writes opening tags and closing tags for elements without a namespace. More... | |
void | WriteEmptyElement (const ExiChar *prefix, const ExiChar *namespace_uri, const ExiChar *local_name) noexcept |
Writes opening tags and closing tags for elements with a namespace. More... | |
void | WriteEndElement () noexcept |
Writes a closing tag. | |
void | WriteStartElement (const ExiChar *local_name) noexcept |
Writes an opening tag of an element without a namespace. More... | |
void | WriteStartElement (const ExiChar *prefix, const ExiChar *namespace_uri, const ExiChar *local_name) noexcept |
Writes an opening tag of an element with a namespace. More... | |
Starting and Ending XML Documents | |
void | WriteStartDocument () noexcept |
Declares the start of an XML document and writes data including the XML declaration. | |
void | WriteEndDocument () noexcept |
Closes all open elements and closes the XML writer. | |
Error Checking | |
ExiErrorStatus::ErrorValue | GetError () const noexcept |
Gets the error value. | |
ExiErrorStatus * | GetErrorStatus () const noexcept |
Gets an error status object. | |
operator bool () const | |
Returns true if an error has not occurred. | |
XmlStreamWriter Object Initialization and Finalization | |
Instantiates an object using a static member function. The | |
static XmlStreamWriter * | Create (OutputStream *stream, const XmlStreamWriterSettings &settings, const ExiAllocatorEx &al) noexcept |
Creates an XmlStreamWriter instance by specifying an objectwise allocator. More... | |
static XmlStreamWriter * | Create (OutputStream *stream, const XmlStreamWriterSettings &settings) noexcept |
Creates an instance of XmlStreamWriter . More... | |
static XmlStreamWriter * | Create (OutputStream *stream) noexcept |
Creates an XmlStreamWriter instance using default settings for XmlStreamWriterSettings . More... | |
static XmlStreamWriter * | Create (OutputStream *stream, const ExiAllocatorEx &al) noexcept |
Creates an XmlStreamWriter instance by specifying an objectwise allocator. More... | |
void | Close () noexcept |
Closes an XmlStreamWriter . The original stream is not actually closed; it merely is detached. | |
Abstract class that writes to an XML stream.
XMLStreamWriter
class in Java StAX
or .NET's XmlWriter
class. XmlStreamWriter::Create()
to create a new XmlStreamWriter
instance. The instance is created by obtaining memory from ExiAllocator
. Definition at line 54 of file XmlStreamWriter.h.
|
staticnoexcept |
Creates an XmlStreamWriter
instance by specifying an objectwise allocator.
[in] | stream | Original output stream. |
[in] | settings | Configuration options. |
[in] | al | Allocator. |
XmlStreamWriter
instance that was created.
|
inlinestaticnoexcept |
Creates an instance of XmlStreamWriter
.
[in] | stream | Original output stream. |
[in] | settings | Configuration options. |
XmlStreamWriter
instance that was created.ExiAllocator
. If successful, it returns a non-NULL
pointer. Generally, the pointer that is returned is stored and used via UniquePtr
. XmlStreamWriterSettings
. For more information, see XmlStreamWriterSettings
. Definition at line 58 of file XmlStreamWriter.h.
|
inlinestaticnoexcept |
Creates an XmlStreamWriter
instance using default settings for XmlStreamWriterSettings
.
[in] | stream | Original output stream. |
XmlStreamWriter
instance that was created.Definition at line 63 of file XmlStreamWriter.h.
|
inlinestaticnoexcept |
Creates an XmlStreamWriter
instance by specifying an objectwise allocator.
[in] | stream | Original output stream. |
[in] | al | Allocator. |
XmlStreamWriter
instance that was created. Definition at line 67 of file XmlStreamWriter.h.
|
inlinenoexcept |
Flushes the XML writer cache.
Definition at line 78 of file XmlStreamWriter.h.
|
inlinenoexcept |
Gets the prefix corresponding to the namespace URI.
[in] | uri | Specifies the namespace URI. |
NULL
if there is no namespace, or an empty string if the namespace is the default namespace. Specifying NULL
for uri is treated as an empty string. Definition at line 82 of file XmlStreamWriter.h.
|
inlinenoexcept |
Writes an attribute and value without a namespace.
[in] | local_name | Specifies the local attribute name. |
[in] | value | Specifies the attribute value. |
Definition at line 86 of file XmlStreamWriter.h.
|
noexcept |
Writes an attribute and value with a namespace.
[in] | prefix | Specifies the namespace prefix of the attribute. |
[in] | namespace_uri | Specifies the namespace URI of the attribute. |
[in] | local_name | Specifies the local attribute name. |
[in] | value | Specifies the attribute value. |
NULL
nor an empty string can be passed to the localName parameter. Specifying NULL
is treated as an empty string in the prefix parameter, namespaceUri parameter, and value parameter.
|
inlinenoexcept |
Writes the text specified as an argument.
[in] | data | Specifies the text to write. |
NULL
for data is treated as an empty string. Definition at line 91 of file XmlStreamWriter.h.
|
inlinenoexcept |
Writes the text specified as an argument.
[in] | text | Specifies the text to write. |
NULL
for text is treated as an empty string. Definition at line 96 of file XmlStreamWriter.h.
|
noexcept |
Writes the XML comment (<!--...-->
) containing text that was specified as an argument.
[in] | data | Specifies the text within the XML comment. |
NULL
for data is treated as an empty string.
|
inlinenoexcept |
Declares the default namespace.
[in] | namespace_uri | Specifies the namespace URI of the default namespace. |
Definition at line 109 of file XmlStreamWriter.h.
|
inlinenoexcept |
Writes opening tags and closing tags for elements without a namespace.
[in] | local_name | Specifies the local element name. |
Definition at line 113 of file XmlStreamWriter.h.
|
noexcept |
Writes opening tags and closing tags for elements with a namespace.
[in] | prefix | Specifies the namespace prefix of the element. |
[in] | namespace_uri | Specifies the namespace URI of the element. |
[in] | local_name | Specifies the local element name. |
|
inlinenoexcept |
Declares the XML namespace.
[in] | prefix | Specifies the prefix corresponding to the namespace. |
[in] | namespace_uri | Specifies the namespace URI. |
NULL
for prefix or namespaceUri is treated as an empty string. Definition at line 103 of file XmlStreamWriter.h.
|
noexcept |
Writes a PI (processing instruction) like <?target data?>
.
[in] | target | Specifies the name of the PI. |
[in] | data | Specifies the text to include in the PI. |
PI
, XmlStreamWriter
must be created with Preserve::pis
set to true
. Otherwise, nothing is written even if you call this function. WriteStartDocument
. NULL
nor an empty string can be passed to the target parameter. Specifying NULL
for data is treated as an empty string.
|
inlinenoexcept |
Writes an opening tag of an element without a namespace.
[in] | local_name | Specifies the local element name. |
Definition at line 136 of file XmlStreamWriter.h.
|
noexcept |
Writes an opening tag of an element with a namespace.
[in] | prefix | Specifies the namespace prefix of the element. |
[in] | namespace_uri | Specifies the namespace URI of the element. |
[in] | local_name | Specifies the local element name. |
NULL
or an empty string for the prefix parameter. © 2012-2017 Nintendo Co., Ltd. All rights reserved.