You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by tn...@apache.org on 2002/03/27 19:03:43 UTC

cvs commit: xml-xerces/c/samples/IDOMCount IDOMCount.cpp

tng         02/03/27 10:03:43

  Modified:    c/samples/IDOMCount IDOMCount.cpp
  Log:
  Correct count element routine.
  
  Revision  Changes    Path
  1.16      +3 -10     xml-xerces/c/samples/IDOMCount/IDOMCount.cpp
  
  Index: IDOMCount.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/IDOMCount/IDOMCount.cpp,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- IDOMCount.cpp	1 Feb 2002 22:36:17 -0000	1.15
  +++ IDOMCount.cpp	27 Mar 2002 18:03:43 -0000	1.16
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: IDOMCount.cpp,v 1.15 2002/02/01 22:36:17 peiyongz Exp $
  + * $Id: IDOMCount.cpp,v 1.16 2002/03/27 18:03:43 tng Exp $
    */
   
   // ---------------------------------------------------------------------------
  @@ -112,16 +112,9 @@
       int count = 0;
       if (n) {
           if (n->getNodeType() == IDOM_Node::ELEMENT_NODE)
  -        {
               count++;
  -            for (child = n->getFirstChild(); child != 0; child=child->getNextSibling())
  -            {
  -                if (child->getNodeType() == IDOM_Node::ELEMENT_NODE)
  -                {
  -                    count += countChildElements(child);
  -                }
  -            }
  -        }
  +        for (child = n->getFirstChild(); child != 0; child=child->getNextSibling())
  +            count += countChildElements(child);
       }
       return count;
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org