Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/xmltree.c

    r7b40f17 r4f7255d  
    66*  Copyright 2006-2012 Wilmer van der Gaast <wilmer@gaast.net>              *
    77*                                                                           *
    8 *  This library is free software; you can redistribute it and/or            *
    9 modify it under the terms of the GNU Lesser General Public               *
    10 License as published by the Free Software Foundation, version            *
    11 2.1.                                                                     *
     8*  This program is free software; you can redistribute it and/or modify     *
     9it under the terms of the GNU General Public License as published by     *
     10the Free Software Foundation; either version 2 of the License, or        *
     11(at your option) any later version.                                      *
    1212*                                                                           *
    13 *  This library is distributed in the hope that it will be useful,          *
     13*  This program is distributed in the hope that it will be useful,          *
    1414*  but WITHOUT ANY WARRANTY; without even the implied warranty of           *
    15 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU        *
    16 Lesser General Public License for more details.                          *
     15*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            *
     16GNU General Public License for more details.                             *
    1717*                                                                           *
    18 *  You should have received a copy of the GNU Lesser General Public License *
    19 along with this library; if not, write to the Free Software Foundation,  *
    20 Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA           *
     18*  You should have received a copy of the GNU General Public License along *
     19with this program; if not, write to the Free Software Foundation, Inc.,  *
     2051 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.              *
    2121*                                                                           *
    2222****************************************************************************/
     
    524524}
    525525
    526 struct xt_node *xt_find_node_by_attr( struct xt_node *xt, const char *tag, const char *key, const char *value ) {
    527         struct xt_node *c;
    528         char *s;
    529 
    530         for( c = xt; ( c = xt_find_node( c, tag ) ); c = c->next )
    531         {
    532                 if( ( s = xt_find_attr( c, key ) ) && strcmp( s, value ) == 0 )
    533                 {
    534                         return c;
    535                 }
    536         }
    537         return NULL;
    538 }
    539 
    540 
    541526/* Strip a few non-printable characters that aren't allowed in XML streams
    542527   (and upset some XMPP servers for example). */
Note: See TracChangeset for help on using the changeset viewer.