nlib
|
Implements binary XML parsers (and XML parsers). More...
Classes | |
class | ExiAllocator |
Allocator used by the XML parser. The user can also use it. More... | |
class | ExiAllocatorEx |
Allocator that can be set for each instance of XmlStreamReader and XmlStreamWriter . More... | |
class | ExiErrorStatus |
Sets and stores the error status of the XML parser. More... | |
class | Preserve |
Set of options that preserve the binary XML to read or write. More... | |
class | XmlStreamReader |
Abstract class that reads from an XML stream. More... | |
class | XmlStreamReaderSettings |
Structure used as the initialization options for XmlStreamReader . More... | |
class | XmlStreamWriter |
Abstract class that writes to an XML stream. More... | |
class | XmlStreamWriterSettings |
Structure used as the initialization options for XmlStreamWriter . More... | |
Typedefs | |
typedef wchar_t | ExiChar |
A string-type typedef used internally by the XML parser. More... | |
Enumerations | |
enum | Alignment { ALIGNMENT_BIT_PACKED = 0, ALIGNMENT_BYTE_ALIGNMENT = 1 } |
Specifies the alignment of the binary XML to read or write. More... | |
enum | XmlProcessor { XML_PROCESSOR_EXI = 0, XML_PROCESSOR_TEXT } |
Option that specifies which XML processor to use. More... | |
Functions | |
bool | TransformXml (XmlStreamReader *r, XmlStreamWriter *w) noexcept |
Reads from XmlStreamReader and writes to XmlStreamWriter . More... | |
Implements binary XML parsers (and XML parsers).
exi
library provides an efficient means of reading and writing XML files in both binary and text format. Using a binary format alleviates problems that can occur when adopting XML, such as verbosity (size) and processing overhead. It enables you to reap the full benefits of using XML while greatly reducing the risks. It also enables you to reduce the use of network bandwidth. exi
library is a partial implementation of W3C EXI. For more information about W3C EXI, see here.exi
library has the following features. It is well-suited to handle XML under conditions where either the network bandwidth or CPU overhead are severely constrained.exi
library can reduce the size of a typical XML file to anywhere from one-third to one-quarter of the original size. One technique is to assign indexes to the strings that appear within the XML document to reduce the amount of data. exi
library is used to parse XML from memory, it can achieve operational speeds equal to or faster than XML parsers that are said to be fast, such as expat
and XmlLite
.exi
library supports namespaces. Generally, authoring tools output XML that includes namespaces. Namespace support is required in order to handle this type of XML file. \(O(n)\)
time. Many old XML parsers run in \(O(n^2)\)
time, which sometimes made them targets of distributed denial-of-service (DDoS) attacks. exi
library does not support DTDs. As a result, it is not possible to create XML bombs using DTDs. XmlStreamWriter
instance.XmlStreamReader
instance. Pull parsing has been implemented in a similar vein as Java's StAX (Streaming API for XML) or the .NET Framework's XmlReader
, enabling easier development than using the DOM or SAX. while
and switch
statements. nexiconv.exe
enables you to convert from XML to binary XML, and vice versa. By performing the following, an XML file can be converted into a binary XML file (with an .nexi
extension). xmllite.dll
. Normally this file is pre-installed on your workstation.exi
library to support both binary XML parsers and text-based XML parsers without increasing the code size much. 0
indicates successful parsing (no syntax errors were reported). A value of 1
indicates a parsing failure (a syntax error was reported). A string-type typedef
used internally by the XML parser.
char
with a typedef
uses UTF-8 encoding. Defining wchar_t
with a typedef
uses either UTF-16 or UTF-32 encoding. Specifies the alignment of the binary XML to read or write.
Enumerator | |
---|---|
ALIGNMENT_BIT_PACKED | Reads from and writes to a bit-packed EXI stream (default). |
ALIGNMENT_BYTE_ALIGNMENT | Reads from and writes to a byte-aligned EXI stream. |
|
noexcept |
Reads from XmlStreamReader
and writes to XmlStreamWriter
.
[in] | r | The stream in which XML is input for reading. |
[in] | w | To stream to which XML is output. |
true
when successful.© 2012-2017 Nintendo Co., Ltd. All rights reserved.