Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] removing one child

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: luca <passani AT eunet.no>
  • Cc: xom-interest <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] removing one child
  • Date: Wed, 10 Nov 2004 08:38:55 -0500

luca wrote:


for(int k = 0; k < devices.size(); k++) {
Elements groups = ((Element)devices.get(k)).getChildElements("group");

//extra list to keep capabilities grouped by group
for (int i = 0; i < groups.size(); i++) {
Elements capaList = groups.get(i).getChildElements("capability");
int numberOfCapabilities += capaList.size();
for (int j = 0; j < capaList.size(); j++) {
Element capa = capaList.get(j);
String capa_name = capa.getAttributeValue("name");
if (!capaAcceptedList.contains(capa_name)) {
groups.get(i).removeChild(capa);
}


--
Elliotte Rusty Harold elharo AT metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim




Archive powered by MHonArc 2.6.24.

Top of Page