[jdom-interest] getChildren case sensativity

Info info at pixelandink.com
Sat Dec 22 12:01:39 PST 2001


*This message was transferred with a trial version of CommuniGate(tm) Pro*
Thanks for the suggestion...

public java.util.List getChildrenIgnoreCase(org.jdom.Element element, String
tagName){
      LinkedList list = new LinkedList();
      java.util.List allChildren = element.getChildren();
      Iterator iter = allChildren.iterator();
      while(iter.hasNext()){
  org.jdom.Element nextElement = (org.jdom.Element)iter.next();
  if(nextElement.getName().compareToIgnoreCase(tagName) == 0){
     list.add(nextElement);
  }
      }

      return list;
   }

----- Original Message -----
From: "rpcee" <rpcee at operamail.com>
To: <jdom-interest at jdom.org>
Sent: Saturday, December 22, 2001 11:19 AM
Subject: RE: [jdom-interest] getChildren case sensativity


> *This message was transferred with a trial version of CommuniGate(tm) Pro*
> you could roll your own, but you cant ever claim to handle xml in a case
> insensitive way because <Tr></tr> isnt well formed

True, it's not well formed, but I need to handle the case where
non-technical/forgetful users might enter either <TD> or <td>
>
> _______________________________________________
> To control your jdom-interest membership:
>
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com
>




More information about the jdom-interest mailing list