octave-bug-tracker
[Top][All Lists]
Advanced

[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: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #45951] Add "xmlread" to core Octave or replace the one in io package
Date: Wed, 11 Nov 2015 18:37:11 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0 SeaMonkey/2.38

Follow-up Comment #20, bug #45951 (project octave):

@Panxto:
Thanks for testing.

The numeric argument isn't undocumented, see e.g., "help xmlread". It could be
more clear, though.

Indeed, I could change behavior into persistently checking during each call
for class libs until those requirements have been fulfilled; and echoing
version if called with no arguments.
Would that be better?  That'd be an easy fix - see attached.

Experience with the Java-based spreadsheet stuff learned that just echoing
some error like "xmlread: couldn't load Xerces parser object" doesn't help
users tracking down the cause; I fear we'd only get help requests in the
help-octave ML or stackoverflow.  Checking for completeness and proper version
is simply required IMO.  All the more as those same class libs are also
required for the ODF Toolkit spreadsheet support interface (OTK).

"demo xmlread" &  "demo xmlwrite" work fine for me.

Another thing:
Why check for "nargout > 0" in xmlwrite.m when returning the xml string? I'd
say an xml string could safely be returned in "ans". I'd say it's up to the
user to decide whether to supply an output arg.
I added a str initialize stmt. at L. 49 + an else clause at the bottom to set
str when writing to file, to suppress "warning: xmlwrite: some elements in
list of return values are undefined".  I'm unsure as to whether it should be 0
or 1 upon success - what's the convention?

<New xmlread.m/xmlwrite.m attached>

(file #35435, file #35436)
    _______________________________________________________

Additional Item Attachment:

File name: xmlwrite.m                     Size:4 KB
File name: xmlread.m                      Size:3 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45951>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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