octave-maintainers
[Top][All Lists]
Advanced

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

Re: XML and Octave: review of tools


From: Andy Adler
Subject: Re: XML and Octave: review of tools
Date: Wed, 26 Apr 2006 12:08:07 -0400 (EDT)

Alois,

A few comments about XML and Octave.

- Matlab does not have a proper / approved XML
  approach yet. They may very well invent one in the
  future, and we will be almost certainly incompatible.

- XML approaches based on the classic parsers (DOM, SAX)
  suck. They make the programmer write way too much
  code, and encourage broken micro-optimizations.

  For a detailed rant about problems with XML, see my
  talk: "10 Mistakes with XML and Perl"
   http://www.site.uottawa.ca/~adler/talks/2003/YAPC-CA-2003-XML-talk.pdf

- A good / easy to use approach needs to provide vectorized
  output. This means we cannot iterate to read the XML
  structure.

As you point out, none of the current offerings are
satisfactory for various reasons (reading all xml files,
code complexity).

Before we put effort into this, could we have a discussion
on this list of what we want to get out of XML tools
for Octave.

As a start, we can compare to what is offered by other
scripting languages. I propose something like XML::Simple
in perl.

--
Andy Adler <address@hidden> 1(613)562-5800x6218

On Wed, 26 Apr 2006, Alois Schloegl wrote:

>
>
> XML support would important for a variaty of data formats. For example,
> it would also enable a simple interface to the ODF-spreadsheet format.
> In order to indentify the most useful approach, I was investigating the
> various XML tools available. Here is the result:
>
> (1) There are XMLREAD and XMLWRITE in Octave-forge. That these functions
> support (only) XML data which follow octave.dtd; other .DTD's are not
> supported.
>
> (2) Then, there is XMLTREE from http://www.artefact.tk/software/matlab/xml/
> It is GPL,  but  it uses object-oriented language elements which are not
> (yet?) supported in Octave.
> Although, XMLTREE extracts only parts of the information in XML files,
> it seems to be the most powerful and flexible approach for reading XML
> files.
>
> (3) XML-toolbox from http://www.geodise.org/downloads/ :
> BSD-like license, The software is distributed as p-code, the m-files
> contain just the help documentation.
> Therefore, it can not be used with Octave.
>
> (4) And there is XML4MAT from http://xml4mat.sourceforge.net/
> It is GPL and come as pure M-file, this would be suitable for Octave.
> However, it requires REGEXPREP. Paul Kienzle did a M-file implemenation
> - Thanks - its already in Octave-forge; an oct-implementation will
> certainly improve speed.
> Unfortunately, XML4MAT does not work with all XML-files. For example,
> it does not work for  the XML files extracted from an ODF spreadsheet.
>
> (5) Finally, there is the attempt to use LIBXML for reading XML files.
> Muthu is familiar with libxml2 and will look into this.
>
> Any thoughts on that ? Did I miss any other approach on XML support in
> Octave?
> Currently, no solution is fully satisfying. If anyone is interested
> working on this, I can provide a suite of XML files for testing and/or
> I'm willing to do the tests.
>
>
> Alois
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


reply via email to

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