VirtualBox

source: vbox/trunk/src/libs/libxml2-2.13.2/include/libxml/pattern.h@ 107504

Last change on this file since 107504 was 105420, checked in by vboxsync, 10 months ago

libxml2-2.12.6: Applied and adjusted our libxml2 changes to 2.12.6. bugref:10730

  • Property svn:eol-style set to native
File size: 2.6 KB
Line 
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
21extern "C" {
22#endif
23
24/**
25 * xmlPattern:
26 *
27 * A compiled (XPath based) pattern to select nodes
28 */
29typedef struct _xmlPattern xmlPattern;
30typedef xmlPattern *xmlPatternPtr;
31
32/**
33 * xmlPatternFlags:
34 *
35 * This is the set of options affecting the behaviour of pattern
36 * matching with this module
37 *
38 */
39typedef enum {
40 XML_PATTERN_DEFAULT = 0, /* simple pattern match */
41 XML_PATTERN_XPATH = 1<<0, /* standard XPath pattern */
42 XML_PATTERN_XSSEL = 1<<1, /* XPath subset for schema selector */
43 XML_PATTERN_XSFIELD = 1<<2 /* XPath subset for schema field */
44} xmlPatternFlags;
45
46XMLPUBFUN void
47 xmlFreePattern (xmlPatternPtr comp);
48
49XMLPUBFUN void
50 xmlFreePatternList (xmlPatternPtr comp);
51
52XMLPUBFUN xmlPatternPtr
53 xmlPatterncompile (const xmlChar *pattern,
54 xmlDict *dict,
55 int flags,
56 const xmlChar **namespaces);
57XMLPUBFUN int
58 xmlPatternCompileSafe (const xmlChar *pattern,
59 xmlDict *dict,
60 int flags,
61 const xmlChar **namespaces,
62 xmlPatternPtr *patternOut);
63XMLPUBFUN int
64 xmlPatternMatch (xmlPatternPtr comp,
65 xmlNodePtr node);
66
67/* streaming interfaces */
68typedef struct _xmlStreamCtxt xmlStreamCtxt;
69typedef xmlStreamCtxt *xmlStreamCtxtPtr;
70
71XMLPUBFUN int
72 xmlPatternStreamable (xmlPatternPtr comp);
73XMLPUBFUN int
74 xmlPatternMaxDepth (xmlPatternPtr comp);
75XMLPUBFUN int
76 xmlPatternMinDepth (xmlPatternPtr comp);
77XMLPUBFUN int
78 xmlPatternFromRoot (xmlPatternPtr comp);
79XMLPUBFUN xmlStreamCtxtPtr
80 xmlPatternGetStreamCtxt (xmlPatternPtr comp);
81XMLPUBFUN void
82 xmlFreeStreamCtxt (xmlStreamCtxtPtr stream);
83XMLPUBFUN int
84 xmlStreamPushNode (xmlStreamCtxtPtr stream,
85 const xmlChar *name,
86 const xmlChar *ns,
87 int nodeType);
88XMLPUBFUN int
89 xmlStreamPush (xmlStreamCtxtPtr stream,
90 const xmlChar *name,
91 const xmlChar *ns);
92XMLPUBFUN int
93 xmlStreamPushAttr (xmlStreamCtxtPtr stream,
94 const xmlChar *name,
95 const xmlChar *ns);
96XMLPUBFUN int
97 xmlStreamPop (xmlStreamCtxtPtr stream);
98XMLPUBFUN int
99 xmlStreamWantsAnyNode (xmlStreamCtxtPtr stream);
100#ifdef __cplusplus
101}
102#endif
103
104#endif /* LIBXML_PATTERN_ENABLED */
105
106#endif /* __XML_PATTERN_H__ */
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette