]> git.saurik.com Git - apple/icu.git/blob - icuSources/samples/xml2txt/xml2txt.h
ICU-3.13.tar.gz
[apple/icu.git] / icuSources / samples / xml2txt / xml2txt.h
1 /******************************************************************************
2 * Copyright (C) 2002, International Business Machines Corporation and
3 * others. All Rights Reserved.
4 ******************************************************************************/
5 #ifndef xml2txt_H_
6 #define xml2txt_H_
7
8 #include <string.h>
9 #include <stdlib.h>
10 #include <stdio.h>
11 #ifdef WIN32
12 #include <direct.h>
13 #else
14 #include <unistd.h>
15 #endif
16
17 #include <process.h>
18 #include <errno.h>
19
20
21 #include "uoptions.h"
22 #include "toolutil.h"
23 #include "ChildName.h"
24 #include "DOMPrintFormatTarget.h"
25
26 //#define UOPTION_TXT UOPTION_DEF("txt", 't', UOPT_NO_ARG)
27 //#define UOPTION_RES UOPTION_DEF("res", 'r', UOPT_NO_ARG)
28
29 void usage();
30 void InitParser();
31 void recycle();
32 int ProcessTxtFile();
33 void ErrorReport(DOM_Node& towrite, int ErrorType);
34 void Check(DOM_Node &document);
35 ostream& operator<<(ostream& target, const DOMString& toWrite);
36 ostream& operator<<(ostream& target, DOM_Node& toWrite);
37 XMLFormatter& operator<< (XMLFormatter& strm, const DOMString& s);
38 char* CreateTxtName(const char* arg, const char* Dir);
39 char* CreateFile(const char* arg, const char* Dir);
40 DOMString CheckIntvector(DOMString attributeVal, DOM_Node document);
41 void CheckInt(DOMString attributeVal, DOM_Node document);
42 void CheckBin(DOMString attributeVal, DOM_Node document);
43 unsigned int GetCNodeNum(DOM_Node document);
44 ChildName* CheckNameDuplicate(DOM_Node document, ChildName* cn);
45 DOMString getAttributeKey(DOM_Node CNode);
46 void DelChildName(ChildName* cn);
47 void CheckEscape(DOM_NamedNodeMap attributes, DOMString attributeVal, int item_num);
48
49 #endif