[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: XML tools for Octave: XML4MAT
From: |
Andy Adler |
Subject: |
Re: XML tools for Octave: XML4MAT |
Date: |
Tue, 16 May 2006 14:39:18 -0400 (EDT) |
On Tue, 9 May 2006, Alois Schloegl wrote:
>
> First the good news:
>
> There is now a possiblity to read a general XML file. Thanks to Paul for
> patching XML4MAT and David for MAT2CELL.CC and REGEXPREP.CC
> If you wants to give it a try: you need
> - need the latest octave (with mat2cell and regexprep)
> - the patched version XML4MAT
> I make this is temporarily available at
> http://hci.tugraz.at/schloegl/biosig/xml/XML4MATv21.zip
>
> An XML-file can be loaded with the command XML2CELL. Paul tested it on
> Octave, I did the test on Matlab.
>
> The good think is, it converts the XML file into one big variable; so no
> complex API's are needed.
I took a quick look at the code you posted from this tool.
In my opinion this code is completely and catastrophically
broken.
1) It parses non-xml files as XML
Example:
<xml>v
<b>v</xml>
2) Is can't parse valid XML
Example:
<xml>v
<b/>v</xml>
Example:
<xml tag="<">v</xml>
3) It gives the same output for different files
Example:
<xml>v<b>v</xml>
And
<xml><b>v</xml>
4) It gives different output of equivalent files:
Example:
<xml>v<b>v</xml>
And
<xml>v<b>v
</xml>
The use of a regexp based XML parser is well known
to be a fundamentally wrong approach.
For these reasons, I would recommend that xml2mat
is not a good code base to work with.
--
Andy Adler <address@hidden> 1(613)562-5800x6218