kesh...@us.ibm.com wrote on 02/19/2009 09:34:36 AM:

>
> >          <report:attributes>
> >             <report:attribute type="Source">TV Cap</report:attribute>
> >             <report:attribute type="Source">HDTV</report:attribute>
> >             <report:attribute type="Video Fmt">x264</report:attribute>
> >             <report:attribute type="Video Fmt">720p</report:attribute>
> >             <report:attribute type="Video
> Genre">Action/Adv</report:attribute>
> >             <report:attribute type="Video
Genre">Drama</report:attribute>
> >             <report:attribute
type="Language">English</report:attribute>
> >          </report:attributes>
> >
> > The "report:attributes" node is returning as having 0 children, as
> > this debug output shows:
>
> Hard to believe, since this sort of bug should be detected and
> corrected immediately during pre-release testing.

... and would have likely been reported several times now if this did
escape into the release. When we've goofed on something so basic in the
past (and it's been a long time since that's happened) we usually hear
about it [1] early and often.

> So as a first step, I'd suggest modifying your code so it captures
> and/or prints out the incoming stream, so you can check that you are
> receiving the document you think you are. (Use a tee filter, or copy
> the stream into a file and parse it back in from there.)
>
> Another obvious question is whether there's another (empty) report:
> attributes element elsewhere in the document, and you're looking at
> that rather than this.
>
> Or there might be a flaw in your DOM-accessing code, which you
> didn't show us. Generally, it's a good idea to work up a small
> stand-alone example which demonstrates the problem -- that gives us
> something we can usefully debug, and if there is a problem in your
> code it often becomes much easier to see when isolated.

[1] http://issues.apache.org/jira/browse/XERCESJ-581

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrgla...@ca.ibm.com
E-mail: mrgla...@apache.org

Reply via email to