[jdom-interest] getChildren(Filter) Bug?

Joe McDaniel mcdanijr at tigr.org
Mon Dec 8 09:09:47 PST 2003

No matter how I try to filter content, no filtering seems to actually
occur.  For instance, here is my snippet:
        Document doc = builder.build("sampleOrder.xml");
        Element root = doc.getRootElement();
        Namespace namespace = root.getNamespace();
        Element lineItemsElement = root.getChild("LineItems",
        List lineItems = lineItemsElement.getChildren();
        Iterator lineItemIterator = lineItems.iterator();
        Element lineItem = null;
        while(lineItemIterator.hasNext() ) 
            lineItem = (Element)lineItemIterator.next();
            List lineItemPrimers = lineItem.getChildren("Primer",

lineItemPrimers contains not just Primer elements but all elements in a
LineItem.  When I look at the code for getChildren(...), I see no place
where filtering actually takes place.  Am I missing something or is this
a bug?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20031208/dff239ff/attachment.htm

More information about the jdom-interest mailing list