texmacs-dev
[Top][All Lists]
Advanced

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

Re: [Texmacs-dev] how do I read xml from file?


From: Joris van der Hoeven
Subject: Re: [Texmacs-dev] how do I read xml from file?
Date: Fri, 28 Nov 2003 12:51:17 +0100 (CET)

On Wed, 26 Nov 2003, Immanuel Normann wrote:
> I'd like to have a function that takes a file-name (of a XML-file) and
> returns an SXML expression.
> Is there already something that does this in Texmacs. If not which
> texmacs functions should I use best?

The routine

        parse-xml

takes an XML string on input and returns the parsed scheme expression.
Notice that this routine does not do any validation. With David,
we are still discussing a bit about the support for character encodings,
so there might still be some minor changes here. As soon as things get
completely stable, you should use something like

        (convert url "xml-file" "xml-object")

in order to do what you want. At the moment, you should still
use parse-xml and

        string-load

in order to load a string from an url (can be a string or something
more complex, like a standard url or a name in a path).

As a general rule, you should look into

        src/Guile/Glue/build-glue-*.scm

and you would have found some of the information you asked for.
I also recall another very useful functionnality:

        Help -> Search -> Source code

Hope that this helps, Joris

------------------
P.S.: please keep us informed on your progress.
      We are very interested!





reply via email to

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