Giter VIP home page Giter VIP logo

xmlite's Introduction

xmlite

Release version Total downloads C++ version

A light-weight single-include C++ XML library, relying on KISS (Keep It Stupid Simple) principle and C++11 STL (similar to my other json library jsonlite).

Overview

Yes, this library is designed to aim for fast compilation times, simplicity and ease of use and almost full compliancy with XML standard, nothing else.

This library also supports exceptions, they are designed to give hints about syntax errors and to be comprehensive. Every object in this libary uses the xmlite::exception as the exception class.

Internally all files with any other BOM-marked encoding (listed in Features section) other than UTF-8 are internally converted to BOM-less UTF-8 (DOM is UTF-8). All non-BOM-marked encodings forwards-compatible with UTF-8 should be OK.

Features

  • DOM-compatible encoding support by default (UTF-8)
  • BOM support:
    • UTF-1
    • UTF-7
    • UTF-8
    • UTF-16 (little endian & big endian)
    • UTF-32 (little endian & big endian)
  • BOM to DOM conversion
  • Quite fool-proof, XML files are checked for correctness before parsing.
  • Supports tag attributes, e.g <tag name="John" age="55"></tag>
  • Supports multiple values inside tag, e.g <tag>1st value<anotherTag>Value inside child tag.</anotherTag>3rd value</tag>
  • Supports value-less tags, e.g <tag attr1="attribute 1" attr2="some other attribute" />
  • DOM to XML dumping support
  • CRLF/LF/CR neutrality -> all dumps are LF

C bindings

The neccessary source files, to compile this C++ library yourself, are loacted in C_bindings. Also, a makefile is provided to compile with GNU C++ compiler. To use this library in C, you have to include the header file C_bindings/include/xmlite.h and link against 64-bit library C_bindings/bin/libxmlite.a (so long as you use GCC's linker to link also against C++ STL). If you want a 32-bit version you have to compile it from source.

The extra documentation for C bindings is located in the C header file xmlite.h.

Testing

This project is by no means perfect. It is open to improvement and suggestion under the Issues tab. Feel free to use this option whenever my library breaks down. Issues regarding the parsing of syntactically correct XML are first priority. Also feel free to suggest any encoding support, that you may feel are neccessary. Currently every encoding, that is forwards-compatible with UTF-8, should be supported.

Licensing

This project uses the MIT license.

xmlite's People

Contributors

makuke1234 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.