guile-sources
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

guile-expat-0.0.1 available


From: Martin Grabmueller
Subject: guile-expat-0.0.1 available
Date: Thu, 22 Feb 2001 13:09:34 +0100

Hello all,

the first version of guile-expat is available at

http://www.pintus.de/mgrabmue/guile/guile-expat-0.0.1.tar.gz

for your downloading pleasure.  For more information about this
package I have attached the README for this release.

Best regards,
  'martin

This is release 0.0.1 of guile-expat.              -*- text -*-

It should be treated as of ALPHA quality - i.e. very carefully!

guile-expat is a compiled Guile module that provides Scheme level
access to the expat XML parser library.

Please send bug reports to <address@hidden>.


Getting Started ======================================================

1. Make sure that you have a recent (January 2001 or later) CVS
   version of Guile installed on your system.  (You can type

     guile -c '(write-line (version))'

   in your terminal window to check which version of Guile you have:
   the output should be `1.4.1'.)  If not, see under "Obtaining
   guile-expat and Guile" how to get it.

2. Make sure that you stand in the `guile-expat' directory and type

     ./configure

   This will configure guile-expat for your system.

3. Type

     make install

   to build and install guile-expat.

   If everything went well we're ready to enter the interpreter...

4. Type

     guile

   You should now be at the Guile prompt ("guile> ").

5. Type

     (use-modules (xml expat))

   so that the guile-expat module gets loaded.

6. We're now ready to try some basic guile-expat functionality.

   Firstly, we use the `xml-parse-file' procedure for parsing the XML
   file `example.xml', which is included in the distribution and looks
   like this:

     <?xml version="1.0"?>
     <example>
     <foo name="bar">
     Frob.
     </foo>
     <foo name="braz">
     Blu bla.
     </foo>
     <?wink da?>
     </example>

     guile> (xml-parse-file "example.xml")
     #(example #() #(#(() "
     ") #(foo #((name . "bar")) #(#(() "
     ") #(() "Frob.") #(() "
     "))) #(() "
     ") #(foo #((name . "braz")) #(#(() "
     ") #(() "Blu bla.") #(() "
     "))) #(() "
     ") #(#f "wink" "da") #(() "
     ")))

   We can see that the XML file is parsed into a tree of vectors.
   Element vectors have the element name as the first element,
   character elements have '() and PI (processing instruction)
   elements have a #f.  The (xml expat) module provides various
   procedures for accessing these vector trees.

   The primitive procedure `xml-parse' (implemented in the shared
   library libguile-xml-expat.so) is used by `xml-parse-file' and has
   a different interface.  `xml-parse' is passed a port and four
   callback procedures, which get called for opening element tags,
   closing tags, character data and processing instructions.
   `xml-parse-file' uses this procedure and maintains a stack of
   elements for constructing the tree.


What Is Included =====================================================

xml-parse - procedure which applies callback procedures for opening
        closing, character data and processing instruction elements

xml-parse-file - procedure which parses an XML file and returns an XML
        tree.

Various accessor procedures for dealing with the XML tree.


What Is Not Included =================================================

Any kind of DOM like accessors.

I hope to add most of these in the future, probably as driven by my
own and other users' requirements.  Contributions are, of course, very
welcome.


About This Distribution ==============================================

Building and installing this distribution gives you:

- a compiled library, libguile-xml-expat.so, which is installed in
  <prefix>/lib .

- a Scheme file, expat.scm, which is installed at
  <prefix>/share/guile/xml/expat.scm

Other interesting files include:

- INSTALL, which contains (generic) instructions on building and
  installing guile-expat.

- NEWS, which describes user-visible changes since the last release of
  guile-expat. 

- COPYING, which describes the terms under which you may redistribute
  guile-expat, and explains that there is no warranty.


Obtaining guile-expat and Guile ======================================

The latest guile-expat release is always available from my Guile page
at http://www.pintus.de/mgrabmue/guile.  This release is at
http://www.pintus.de/mgrabmue/guile/guile-expat-0.0.1.tar.gz.

If you don't already have a recent (January 2001 or later) CVS Guile
installed on your system, you also need to download and install this
by following the instructions at http://www.gnu.org/software/guile.

The mailing list address@hidden' carries discussions, questions,
and often answers, about Guile.  To subscribe, send mail to
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]