diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-27 13:18:30 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-27 13:18:30 +0000 |
commit | 4021aa231eba31a0d925e4d7c9013d44ccf79f30 (patch) | |
tree | 029c5884634b2f0d1edf5e5737a28ef0207f8cfa /include | |
parent | f952f1e1441eadb162cf49d41b2ee4977f872971 (diff) |
XML API extended by two file operations: save to & read from file
git-svn-id: http://svn.miranda-ng.org/main/trunk@4217 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include')
-rw-r--r-- | include/m_xml.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/m_xml.h b/include/m_xml.h index 24cb21bf4f..12c7bda369 100644 --- a/include/m_xml.h +++ b/include/m_xml.h @@ -39,6 +39,33 @@ typedef enum }
XML_ELEMENT_TYPE;
+/// Enumeration for XML parse errors.
+typedef enum XMLError
+{
+ eXMLErrorNone = 0,
+ eXMLErrorMissingEndTag,
+ eXMLErrorNoXMLTagFound,
+ eXMLErrorEmpty,
+ eXMLErrorMissingTagName,
+ eXMLErrorMissingEndTagName,
+ eXMLErrorUnmatchedEndTag,
+ eXMLErrorUnmatchedEndClearTag,
+ eXMLErrorUnexpectedToken,
+ eXMLErrorNoElements,
+ eXMLErrorFileNotFound,
+ eXMLErrorFirstTagNotFound,
+ eXMLErrorUnknownCharacterEntity,
+ eXMLErrorCharacterCodeAbove255,
+ eXMLErrorCharConversionError,
+ eXMLErrorCannotOpenWriteFile,
+ eXMLErrorCannotWriteFile,
+
+ eXMLErrorBase64DataSizeIsNotMultipleOf4,
+ eXMLErrorBase64DecodeIllegalCharacter,
+ eXMLErrorBase64DecodeTruncatedData,
+ eXMLErrorBase64DecodeBufferTooSmall
+} XMLError;
+
typedef struct
{
size_t cbSize;
@@ -110,6 +137,9 @@ typedef struct XML_ELEMENT_POS (*positionOfChildByName)(HXML, LPCTSTR name, int i);
XML_ELEMENT_POS (*positionOfText)(HXML, int i);
XML_ELEMENT_POS (*positionOfClear)(HXML, int i);
+
+ HXML (*parseFile)(LPCTSTR filename, int* datalen, LPCTSTR tag);
+ XMLError (*toFile)(HXML node, LPCTSTR filename);
}
XML_API;
|