Created
August 25, 2013 13:49
-
-
Save brokendish/6333932 to your computer and use it in GitHub Desktop.
xml_CSV_Getlib.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* xml_CSV_Get.h */ | |
#ifndef XML_CSV_GETLIB_H | |
#define XML_CSV_GETLIB_H | |
#include <libxml/tree.h> | |
#include <libxml/parser.h> | |
#include <libxml/xpath.h> | |
/* fgetsの指定バイト数 */ | |
#define READ_SIZE 4096 | |
/* content(取得項目のサイズ) */ | |
#define CONTENT_SIZE 4096 | |
/* | |
---------------------------------------------------------------------- | |
xmlns属性(XML名前空間(ネームスペース))用 構造体 | |
---------------------------------------------------------------------- | |
*/ | |
typedef struct XmlNs_Dat { | |
char *prefixName; /* プレフィックス */ | |
char *nameSpace; /* ネームスペース */ | |
struct XmlNs_Dat *next; | |
} XMLNS_DAT; | |
XMLNS_DAT st_dat; /* 構造体の実態を定義(開始位置用) */ | |
XMLNS_DAT *ns_ptr; /* リスト構築用のポインタ */ | |
XMLNS_DAT *new_ptr; /* メモリーを確保用構造体のポインタ */ | |
/* | |
---------------------------------------------------------------------- | |
XML Xpath取得用 構造体 | |
---------------------------------------------------------------------- | |
*/ | |
typedef struct XmlXp_Dat { | |
char *xpathName; /* Xpath */ | |
struct XmlXp_Dat *next; | |
} XMLXP_DAT; | |
XMLXP_DAT xptSt_dat; /* 構造体の実態を定義(開始位置用) */ | |
XMLXP_DAT *xpt_ptr; /* リスト構築用のポインタ */ | |
XMLXP_DAT *xptNew_ptr; /* メモリーを確保用構造体のポインタ */ | |
/* | |
---------------------------------------------------------------------- | |
関数定義 | |
---------------------------------------------------------------------- | |
*/ | |
int xmlCSV_Get_Main(int opt, char *input_file, char *xpat[], char *nmsp[]); | |
int xml_CSV_Get_execute(int opt, char *input_file); | |
void replace_char(char *str); | |
void print_attr(xmlAttrPtr attr, FILE *output); | |
void print_xpath_nodes(xmlNodeSetPtr nodes, FILE *output); | |
int execute_xpath_get(xmlDocPtr doc, xmlChar *xpath_expr ,struct XmlNs_Dat *lns); | |
int execute_xpath_ListGet(xmlDocPtr doc, struct XmlXp_Dat *xpt,struct XmlNs_Dat *lns); | |
int test(char *aa[]); | |
int regex_seek(char *str, char *regexstr); | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment