1 /* 2 * Copyright (c) 2019, Red Hat, Inc. 3 * Copyright (c) 2019, Masatake YAMATO 4 * 5 * This source code is released for free distribution under the terms of the 6 * GNU General Public License version 2 or (at your option) any later version. 7 */ 8 9 #ifndef CTAGS_PARSER_XML_H 10 #define CTAGS_PARSER_XML_H 11 12 /* 13 * INCLUDE FILES 14 */ 15 #include "general.h" /* must always come first */ 16 #include "subparser.h" 17 18 /* 19 * DATA DECLARATIONS 20 */ 21 22 typedef struct sXmlSubparser xmlSubparser; 23 struct sXmlSubparser { 24 subparser subparser; 25 26 /* Similar to makeTagEntryNotify method of subparser. 27 * However, makeTagEntryWithNodeNotify passes the xml node 28 * just found to subparsers. 29 */ 30 void (* makeTagEntryWithNodeNotify) (xmlSubparser *s, 31 xmlNode *node, tagEntryInfo *xmlTag); 32 33 /* A subparser should call findXMLTags() in the callback function 34 * assigned to this field. The XML base parser prepares CTX and ROOT. 35 * A subparser may pass the CTX and ROOT to findXMLTags(). 36 * The XML base parser tags id= and namespace related attributes before 37 * calling this hook. CTX and ROOT are already used once by 38 * the XML base parser for tagging id= and namespace related attributes. 39 * The resource life cycle of CTX and ROOT is managed by the base parser. 40 */ 41 void (* runXPathEngine) (xmlSubparser *s, 42 xmlXPathContext *ctx, xmlNode *root); 43 }; 44 45 #endif /* CTAGS_PARSER_XML_H */ 46