Giter VIP home page Giter VIP logo

xml-light's Introduction

Xml-Light :

build

Xml Light is a minimal Xml parser & printer for OCaml. It provide few functions to parse a basic Xml document into an OCaml data structure and to print back the data structures to an Xml document.

Xml Light has also support for DTD (Document Type Definition).

Install

  dune build
  dune install

Usage

simple samples :

parse / print an xml string

  let x = Xml.parse_string "<a href='url'>TEXT<begin/><end/></a>" in
  Printf.printf "XML formated = \n%s" (Xml.to_string_fmt x);

load an xml and a dtd , prove and print

  let x = Xml.parse_file "myfile.xml" in
  let dtd = Dtd.parse_file "myfile.dtd" in
  let x = Dtd.prove (Dtd.check dtd) "start" x in
  print_endline (Xml.to_string x)

Documentation

HTML documentation can be generated with ocamldoc :

  dune build @doc

You can also directly browse the MLI files to read it.

Licence

Xml Light is distributed under the terms of the GNU Library General Public License, with the special exception on linking described below. (This is the OCaml library licence.)

As a special exception to the GNU Library General Public License, you may link, statically or dynamically, a "work that uses the Library" with a publicly distributed version of the Library to produce an executable file containing portions of the Library, and distribute that executable file under terms of your choice, without any of the additional requirements listed in clause 6 of the GNU Library General Public License. By "a publicly distributed version of the Library", we mean either the unmodified Library as distributed by INRIA, or a modified version of the Library that is distributed under the conditions defined in clause 3 of the GNU Library General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU Library General Public License.

Credits

(c)2003-2005 Nicolas Cannasse ([email protected])

(c)2003-2005 Motion-Twin

Some parts of this code source has an additionnal copyright to Jacques Garrigue

xml-light's People

Contributors

a12n avatar bguil avatar ddeclerck avatar gasche avatar hhugo avatar kit-ty-kate avatar ncannasse avatar waneck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

xml-light's Issues

Error parsing document containing '>'

I have a small document like this:

<?xml version="1.0"  encoding="utf-8"?>
<entry>
   f --> g
</entry>

Parsing it with xml-light yields:
Xml node expected line 3 character 7

xmllint command line utility shows it as well formed. AFAIK, '>' is allowed in this context (although perhaps &gt; might be preferable).

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.