1 /* 2 * Copyright (C) 2000-2003 Chris Ross and various contributors 3 * Copyright (C) 1999-2000 Chris Ross 4 * Copyright (C) 2004 Christian M. Stamgren 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to 8 * deal in the Software without restriction, including without limitation the 9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 * sell copies of the Software, and to permit persons to whom the Software is 11 * furnished to do so, subject to the following conditions: 12 * 13 * The above copyright notice and this permission notice shall be included in 14 * all copies of the Software, its documentation and marketing & publicity 15 * materials, and acknowledgment shall be given in the documentation, materials 16 * and software packages that this Software was used. 17 * 18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 21 * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 22 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 23 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 */ 25 #ifndef __TREE_HANDLERS_H__ 26 #define __TREE_HANDLERS_H__ 27 28 29 #include <stdio.h> 30 #include <string.h> 31 #include <stdlib.h> 32 #include <libxml/xmlmemory.h> 33 #include <libxml/parser.h> 34 #include <libxml/xmlerror.h> 35 #include <libxml/parserInternals.h> 36 #include <libxml/xpathInternals.h> 37 #include "ferite.h" 38 39 40 typedef struct __xmldoc { 41 xmlDocPtr doc; 42 xmlNodePtr node; 43 } XMLDoc; 44 45 46 void tree_error_handler(void * ctxt, const char * msg, ...); 47 FeriteVariable *create_element_node( FeriteScript *script, xmlDocPtr doc, xmlNodePtr node ); 48 xmlXPathObjectPtr get_nodes_with_name_xpath( XMLDoc *tree, FeriteString *str ); 49 void recursive_namespace_copy( xmlNodePtr target, xmlNodePtr ref ); 50 51 #endif /* __TREE_HANDLERS_H__ */ 52