[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45951] Add "xmlread" to core Octave or replac
From: |
Pantxo Diribarne |
Subject: |
[Octave-bug-tracker] [bug #45951] Add "xmlread" to core Octave or replace the one in io package |
Date: |
Mon, 14 Sep 2015 19:23:15 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0 |
Follow-up Comment #7, bug #45951 (project octave):
>> Why is classdef required, or so advatageous, for reading XML?
I don't know of another way to have "object.method (args)" syntax (as in ML,
see e.g. [1]) in the interpreter ... well except for Java objects.
I am also completely ignorant about xml parsers *and* Java. Simply saying that
wrapping all (very many) methods from libxml2 to obtain an interface that we
could have using a few lines of code is a waste of time:
function doc = xmlread (fname)
parser = javaObject ('org.apache.xerces.parsers.DOMParser');
parser.parse(filename);
doc = parser.getDocument;
endfunction
Once we have the path to relevant Xerces jar files, as explained in the wiki,
the above is enough to run Matlab examples.
The only problem I had to run examples in [2] is that the returned object has
no "getMethods" method so e.g. "methods (doc)" doesn't work in Octave out of
the box (I used try/catch).
[1]
http://fr.mathworks.com/help/matlab/import_export/importing-xml-documents.html#bsmj8la
[2] http://fr.mathworks.com/help/matlab/ref/xmlread.html
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45951>
_______________________________________________
Message posté via/par Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #45951] Add "xmlread" to core Octave or replace the one in io package, Pantxo Diribarne, 2015/09/13
- [Octave-bug-tracker] [bug #45951] Add "xmlread" to core Octave or replace the one in io package, Philip Nienhuis, 2015/09/13
- [Octave-bug-tracker] [bug #45951] Add "xmlread" to core Octave or replace the one in io package, Philip Nienhuis, 2015/09/13
- [Octave-bug-tracker] [bug #45951] Add "xmlread" to core Octave or replace the one in io package, Mike Miller, 2015/09/14
- [Octave-bug-tracker] [bug #45951] Add "xmlread" to core Octave or replace the one in io package, Pantxo Diribarne, 2015/09/14
- [Octave-bug-tracker] [bug #45951] Add "xmlread" to core Octave or replace the one in io package, Mike Miller, 2015/09/14
- [Octave-bug-tracker] [bug #45951] Add "xmlread" to core Octave or replace the one in io package, Philip Nienhuis, 2015/09/14
- [Octave-bug-tracker] [bug #45951] Add "xmlread" to core Octave or replace the one in io package,
Pantxo Diribarne <=
- [Octave-bug-tracker] [bug #45951] Add "xmlread" to core Octave or replace the one in io package, Mike Miller, 2015/09/14
- [Octave-bug-tracker] [bug #45951] Add "xmlread" to core Octave or replace the one in io package, Philip Nienhuis, 2015/09/14
- [Octave-bug-tracker] [bug #45951] Add "xmlread" to core Octave or replace the one in io package, Pantxo Diribarne, 2015/09/15
- [Octave-bug-tracker] [bug #45951] Add "xmlread" to core Octave or replace the one in io package, Philip Nienhuis, 2015/09/15