[Fwd: [jdom-interest] Problem with getChildren() (again)]

Christophe D. Laprun chris.laprun at nist.gov
Thu Aug 17 08:10:07 PDT 2000


"Van Dooren, Damian" wrote:
> 
> The way your XML is defined only has one <Feature> at the <Metadata> level.
> The other 2 Features are under the first <Feature>.

Perfectly right! Thanks. In fact that wasn't exactly my problem (which
was about the other Feature (role=speaker-id) which was not returned). I
am sorry to have spammed the list with my inchorent mumbling. I solved
my problem now. I really apologize for sending that irrelevant message.

Regards,

Chris

> > Hi,
> >
> > I have a piece of XMl that looks like this:
> > ...
> > <Metadata>
> >   <Feature role="test">
> >       <Feature id="dr1" role="dialect">
> >     <Parameter role="dialect-code" datatype="string">dr1</Parameter>
> >     <Parameter role="dialect" datatype="string">Northeast</Parameter>
> >   </Feature>
> >
> >   <Feature id="jsp0" role="speaker-id">
> >     <Parameter role="initials" datatype="string">jsp</Parameter>
> >     <Parameter role="suffix" datatype="int">0</Parameter>
> >     <Parameter role="sex" datatype="string">female</Parameter>
> >     <Parameter role="DOB" datatype="string">06/10/64</Parameter>
> >   </Feature>
> >   </Feature>
> > </Metadata>
> > ...
> >
> > and when I try to do the following:
> >
> > metadata.getChildren("Feature"),
> >
> > the only thing that's returned is the first Feature element (with
> > role="test").
> >
> > The problem seems to come at the Element level since content only
> > contains this first element. Could that be a bug of
> > SAXBuilder or Xerces
> > ?

-- 
Christophe Laprun    [Ingenieur ISIMA, France / Guest researcher @NIST]
web: http://www.nist.gov/speech/staff/laprunch.htm
email: chris.laprun at nist.gov
phone: (301) 975 3191             fax: (301) 670 0939
--
The universe seems neither benign nor hostile, merely indifferent -
Sagan



More information about the jdom-interest mailing list