Changeset 9984
- Timestamp:
- 2005-05-30T15:10:41+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/colservr/expat_document.cpp
r9744 r9984 3 3 #include <string.h> 4 4 #include <expat.h> 5 #include "gsdlunicode.h" 5 6 6 7 #if defined(GSDL_USE_OBJECTSPACE) … … 63 64 } 64 65 } 65 int expat_document(const text_t &filename, const text_t &sec_level, const text_t &sec_num, text_t & doc_content){66 66 67 68 int expat_document(const text_t &filename, const text_t &sec_level, const text_t &sec_num, text_t & doc_content) 69 { 67 70 text_t current_text; 68 71 current_text.clear(); 69 72 text_t section_num = sec_num; 70 73 text_t section_level = sec_level; 71 72 74 73 75 resultpack rpack = { ¤t_text, §ion_num, §ion_level, false}; … … 76 78 read_file(filename, doc_text); 77 79 78 79 char * c_doc_text = doc_text.getcstr(); 80 char* c_doc_text = doc_text.getcstr(); 80 81 XML_Parser parser = XML_ParserCreate(NULL); 81 82 … … 97 98 XML_ParserFree(parser); 98 99 free(c_doc_text); 99 doc_content.clear(); 100 doc_content.append(current_text); 100 doc_content = to_uni(current_text); // Vital for non-ASCII documents 101 101 return return_status; 102 102 }
Note:
See TracChangeset
for help on using the changeset viewer.