Giter Club home page Giter Club logo

xmlfs's Introduction

xmlfs

xmlfs is an userspace application that lets you represent an XML file as a directory structure for easy access. In this early version, xmlfs only supports read operations. This may be extended in the future.

Distribution specific links:

Representation

  • Nodes are represented as directories.
  • Node attributes are represented as files, named as the attribute and contiaining the value.
  • Node content is available in the #text file.

An example XML file and the corresponding directory structure is shown below.

<root rattr="1">
    <node attribute="attrib_value" />
    <node attribute2="second node" />
    <other attribute="attrib_value" />
    <textcontent>some text</textcontent>
</root>

Example operations:

$ tree
.
`-- 1.root
    |-- 1.node
    |   `-- attribute
    |-- 1.other
    |   `-- attribute
    |-- 1.textcontent
    |   `-- #text
    |-- 2.node
    |   `-- attribute2
    `-- rattr

$ cat 1.root/2.node/attribute2 
second node

$ cat 1.root/1.textcontent/#text 
some text

As you can see in the example, node names are prefix with an index. This is nescessary as an XML node can have many children with the same name.

Installation

xmlfs depends on FUSE 2.6+ and libxml2. Please install this before building xmlfs.

Edit config.mk to match your setup. Next run

$ make

Finally, as root:

# make install

To uninstall, as root:

# make uninstall

Usage

$ mkdir mount_dir/
$ xmlfs -o xmlfile=file.xml mount_dir/

Unmount with $ fusermount -u mount_dir

Fore more information, please run xmlfs --help or have a look at the FUSE wiki.

Limitations

In this early version, xmlfs is a read-only filesystem. Also, it only reads basic XML and usage with non-ASCII characters has not been tested.

Known errors:

  • valgrind reports false free()'s from using xml_rootparent

License

Copyright (c) 2009 Henrik Hallberg [email protected]. Released under GPL 2, see LICENSE for details. Please report bugs or feature requests by email or at github.

xmlfs's People

Contributors

halhen avatar

Watchers

James Cloos avatar Andrew Smalley avatar  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.