Compartilhar via


XmlLite Samples

 

This section provides the following samples of XmlLite programming in C/C++.

To run these samples, you must have installed the XmlLite development files, Xmllite.lib and Xmllite.h. For more information, see Installing XmlLite.

Read an XML Document using XmlLite
This example shows how to implement a basic XML document reader and writer app with XmlLite.

Write an XML Document using XmlLite
This example provides details of how to write an XML document by using XmlLite.

Process (Read and Write) an XML Document using XmlLite
This example shows how to process an XML document and create a derivative XML document from it.

Writing with Samespaces: Specifying a Namespace Prefix and URI
This example shows the simplest case of writing with namespaces by specifying a namespace prefix and URI.

Writing with Samespaces: Specifying a Default Namespace
This example provides details of how to write with a default namespace.

Writing with Samespaces: Forcing an Attribute to Be in No Namespace
This example shows how to force an attribute to be in no namespace.

Writing with Samespaces: Nesting Namespaces
This example writes a document that contains nested namespaces.

Write an Encoded XML Document Using XmlLite
This example writes an XML document that is encoded with UTF-16 (Unicode).

Read an Encoded XML Document using XmlLite
This example reads a UTF-16 encoded document.

Read an Xml Document Using Chunking
This example shows how to use chunking. Chunking is a process that provides better memory management when reading very large XML documents.

Reading an XML Document Using a Limiting IMalloc Implementation
This example shows how to implement a memory manager that limits how much memory the parser can allocate.

Reading an XML Document While Resolving External Entities
This example shows how to implement an external entity resolver.

Reading an RSS Feed
The example shows the performance benefit of using a nonblocking parser in XmlLite to read an RSS feed, as opposed to using synchronous download stream parsing.

Reading an HYPERLINK "https://code.msdn.microsoft.com/XmlLite-mixed-content-file-05f9a1cb" XmlLite Mixed-Content File
This example shows how to use XmlLite to read an interleaved file that contains mixed XML and text content.

Writing an XML Document with a DOCTYPE Declaration
This example shows how to use a DOCTYPE declaration to write a document with a specified name and attributes.

Universal Windows Platform (UWP) XmlLite sample
This example shows how to use IXmlReader, IXmlWriter, and IXmlWriterLite to read and write XML files in a Universal Windows app.

See Also

XmlLite Programmer's Guide
Installing XmlLite