[964] | 1 | /* |
---|
| 2 | * Summary: pattern expression handling |
---|
| 3 | * Description: allows to compile and test pattern expressions for nodes |
---|
| 4 | * either in a tree or based on a parser state. |
---|
| 5 | * |
---|
| 6 | * Copy: See Copyright for the status of this software. |
---|
| 7 | * |
---|
| 8 | * Author: Daniel Veillard |
---|
| 9 | */ |
---|
| 10 | |
---|
| 11 | #ifndef __XML_PATTERN_H__ |
---|
| 12 | #define __XML_PATTERN_H__ |
---|
| 13 | |
---|
| 14 | #include <libxml/xmlversion.h> |
---|
| 15 | #include <libxml/tree.h> |
---|
| 16 | #include <libxml/dict.h> |
---|
| 17 | |
---|
| 18 | #ifdef LIBXML_PATTERN_ENABLED |
---|
| 19 | |
---|
| 20 | #ifdef __cplusplus |
---|
| 21 | extern "C" { |
---|
| 22 | #endif |
---|
| 23 | |
---|
| 24 | /** |
---|
| 25 | * xmlPattern: |
---|
| 26 | * |
---|
| 27 | * A compiled (XPath based) pattern to select nodes |
---|
| 28 | */ |
---|
| 29 | typedef struct _xmlPattern xmlPattern; |
---|
| 30 | typedef xmlPattern *xmlPatternPtr; |
---|
| 31 | |
---|
| 32 | XMLPUBFUN void XMLCALL |
---|
| 33 | xmlFreePattern (xmlPatternPtr comp); |
---|
| 34 | |
---|
| 35 | XMLPUBFUN void XMLCALL |
---|
| 36 | xmlFreePatternList (xmlPatternPtr comp); |
---|
| 37 | |
---|
| 38 | XMLPUBFUN xmlPatternPtr XMLCALL |
---|
| 39 | xmlPatterncompile (const xmlChar *pattern, |
---|
| 40 | xmlDict *dict, |
---|
| 41 | int flags, |
---|
| 42 | const xmlChar **namespaces); |
---|
| 43 | XMLPUBFUN int XMLCALL |
---|
| 44 | xmlPatternMatch (xmlPatternPtr comp, |
---|
| 45 | xmlNodePtr node); |
---|
| 46 | |
---|
| 47 | /* streaming interfaces */ |
---|
| 48 | typedef struct _xmlStreamCtxt xmlStreamCtxt; |
---|
| 49 | typedef xmlStreamCtxt *xmlStreamCtxtPtr; |
---|
| 50 | |
---|
| 51 | XMLPUBFUN int XMLCALL |
---|
| 52 | xmlPatternStreamable (xmlPatternPtr comp); |
---|
| 53 | XMLPUBFUN int XMLCALL |
---|
| 54 | xmlPatternMaxDepth (xmlPatternPtr comp); |
---|
| 55 | XMLPUBFUN int XMLCALL |
---|
| 56 | xmlPatternFromRoot (xmlPatternPtr comp); |
---|
| 57 | XMLPUBFUN xmlStreamCtxtPtr XMLCALL |
---|
| 58 | xmlPatternGetStreamCtxt (xmlPatternPtr comp); |
---|
| 59 | XMLPUBFUN void XMLCALL |
---|
| 60 | xmlFreeStreamCtxt (xmlStreamCtxtPtr stream); |
---|
| 61 | XMLPUBFUN int XMLCALL |
---|
| 62 | xmlStreamPush (xmlStreamCtxtPtr stream, |
---|
| 63 | const xmlChar *name, |
---|
| 64 | const xmlChar *ns); |
---|
| 65 | XMLPUBFUN int XMLCALL |
---|
| 66 | xmlStreamPushAttr (xmlStreamCtxtPtr stream, |
---|
| 67 | const xmlChar *name, |
---|
| 68 | const xmlChar *ns); |
---|
| 69 | XMLPUBFUN int XMLCALL |
---|
| 70 | xmlStreamPop (xmlStreamCtxtPtr stream); |
---|
| 71 | #ifdef __cplusplus |
---|
| 72 | } |
---|
| 73 | #endif |
---|
| 74 | |
---|
| 75 | #endif /* LIBXML_PATTERN_ENABLED */ |
---|
| 76 | |
---|
| 77 | #endif /* __XML_PATTERN_H__ */ |
---|