Eneboo - Documentación para desarrolladores
|
00001 /* 00002 * Summary: pattern expression handling 00003 * Description: allows to compile and test pattern expressions for nodes 00004 * either in a tree or based on a parser state. 00005 * 00006 * Copy: See Copyright for the status of this software. 00007 * 00008 * Author: Daniel Veillard 00009 */ 00010 00011 #ifndef __XML_PATTERN_H__ 00012 #define __XML_PATTERN_H__ 00013 00014 #include <libxml/xmlversion.h> 00015 #include <libxml/tree.h> 00016 #include <libxml/dict.h> 00017 00018 #ifdef LIBXML_PATTERN_ENABLED 00019 00020 #ifdef __cplusplus 00021 extern "C" { 00022 #endif 00023 00029 typedef struct _xmlPattern xmlPattern; 00030 typedef xmlPattern *xmlPatternPtr; 00031 00039 typedef enum { 00040 XML_PATTERN_DEFAULT = 0, /* simple pattern match */ 00041 XML_PATTERN_XPATH = 1<<0, /* standard XPath pattern */ 00042 XML_PATTERN_XSSEL = 1<<1, /* XPath subset for schema selector */ 00043 XML_PATTERN_XSFIELD = 1<<2 /* XPath subset for schema field */ 00044 } xmlPatternFlags; 00045 00046 XMLPUBFUN void XMLCALL 00047 xmlFreePattern (xmlPatternPtr comp); 00048 00049 XMLPUBFUN void XMLCALL 00050 xmlFreePatternList (xmlPatternPtr comp); 00051 00052 XMLPUBFUN xmlPatternPtr XMLCALL 00053 xmlPatterncompile (const xmlChar *pattern, 00054 xmlDict *dict, 00055 int flags, 00056 const xmlChar **namespaces); 00057 XMLPUBFUN int XMLCALL 00058 xmlPatternMatch (xmlPatternPtr comp, 00059 xmlNodePtr node); 00060 00061 /* streaming interfaces */ 00062 typedef struct _xmlStreamCtxt xmlStreamCtxt; 00063 typedef xmlStreamCtxt *xmlStreamCtxtPtr; 00064 00065 XMLPUBFUN int XMLCALL 00066 xmlPatternStreamable (xmlPatternPtr comp); 00067 XMLPUBFUN int XMLCALL 00068 xmlPatternMaxDepth (xmlPatternPtr comp); 00069 XMLPUBFUN int XMLCALL 00070 xmlPatternMinDepth (xmlPatternPtr comp); 00071 XMLPUBFUN int XMLCALL 00072 xmlPatternFromRoot (xmlPatternPtr comp); 00073 XMLPUBFUN xmlStreamCtxtPtr XMLCALL 00074 xmlPatternGetStreamCtxt (xmlPatternPtr comp); 00075 XMLPUBFUN void XMLCALL 00076 xmlFreeStreamCtxt (xmlStreamCtxtPtr stream); 00077 XMLPUBFUN int XMLCALL 00078 xmlStreamPushNode (xmlStreamCtxtPtr stream, 00079 const xmlChar *name, 00080 const xmlChar *ns, 00081 int nodeType); 00082 XMLPUBFUN int XMLCALL 00083 xmlStreamPush (xmlStreamCtxtPtr stream, 00084 const xmlChar *name, 00085 const xmlChar *ns); 00086 XMLPUBFUN int XMLCALL 00087 xmlStreamPushAttr (xmlStreamCtxtPtr stream, 00088 const xmlChar *name, 00089 const xmlChar *ns); 00090 XMLPUBFUN int XMLCALL 00091 xmlStreamPop (xmlStreamCtxtPtr stream); 00092 XMLPUBFUN int XMLCALL 00093 xmlStreamWantsAnyNode (xmlStreamCtxtPtr stream); 00094 #ifdef __cplusplus 00095 } 00096 #endif 00097 00098 #endif /* LIBXML_PATTERN_ENABLED */ 00099 00100 #endif /* __XML_PATTERN_H__ */