Re: [xml] reading MRML file with XML2... how to access text in nodes?

On Wed, Dec 09, 2009 at 05:11:48PM -0500, Michel Audette wrote:
Dear XML users,

I am attempting to read a MRML file using

  doc = xmlReadFile(this->Filename.c_str(), NULL, 0);

and processing the doc file node by node,  where the MRML file features the
following type of entries...
 id="vtkMRMLSliceNode2" name="Red" hideFromEditors="true" selectable="true"
selected="false" fieldOfView="258.98 249.71 1" dimensions="894 862 1"
activeSlice="0" la
youtGridRows="1" layoutGridColumns="1" sliceToRAS="-1 0 0 0 0 1 0 0 0 0 1 0
0 0 0 1" layoutName="Red" orientation="Axial" jumpMode="1"
sliceVisibility="false" widge
tVisibility="false" useLabelOutline="false" sliceSpacingMode="0"
prescribedSliceSpacing="1 1 1"></Slice>

I'm finding that "meaningful" nodes seem to alternate with nodes whose name
is "text", and I would like to find a way to parse what is in these "text"
nodes. Meantime, I get results like this:

  item 4

on a text node the textual content is available from the ->content
field, surprizing isn't it ?


Daniel Veillard      | libxml Gnome XML XSLT toolkit
daniel veillard com  | Rpmfind RPM search engine | virtualization library

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