OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] code challenge

[ Lists Home | Date Index | Thread Index ]

Toivo \"Deutsch\" Lainevool wrote:
> Nope, that won't work, you can't construct a new loop in every call of
> the method.

By changing
   getChildren((Element) child);
to
   elements.addAll(getChildren((Element)child));

He should be fine though (not considering efficiency).

Hoping that not all getElementsByTagName* methods are broke, original
poster could try:

NodeList list = document.getElementsByTagName("*");

Or document.getDocumentElement().getElementsByTagName("*") as the 
original code did, but that doesn't include the top level element in the
list.

Morten






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS