help-octave
[Top][All Lists]
Advanced

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

any suggestions for reading in a XML file?


From: indium
Subject: any suggestions for reading in a XML file?
Date: Wed, 28 Nov 2012 12:21:42 +0000
User-agent: Mutt/1.5.20 (2009-06-14)

Dear all,

>From the io-1.0.20 I understand that reading an xml file is not yet 
>implemented. I started writing a script to read in an xml file like

<tag1 spec1=x spec2=y>
 <tag2>
  <tag3>blah</tag3>
  <tag3>blahblah</tag3>
 </tag2>
</tag1>

For ease of use and generality I would like to read in all values as strings. 
As an example I'd like to end up with a

structure.tag1.tag2.tag3="blah"

But since there can be several <tag3>s, I think I need to put them together 
into 
structure.tag1.tag2.tag3{1,1:2}  (or any other size).

This however prohibits me of creating further sub groups like .tag3.tag4, since 
tag3 is now an 'end station', being a cell.

Is there a way to make tag3 contain subgroups and ALSO give assign a value or 
matrix to tag3?

My choice for a struct is based on my preference for 'easy scrolling' through 
the structure. Once the XML file is read in, I call the structure.<TAB> on the 
command line to see what its subgroups are.

Any suggestions are welcome on the approach or philosophy (or anything).

  

Attachment: readxml.m
Description: Text document


reply via email to

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