From 9d47720a88ee77ac4c0ab5f138a8eaf601c492d0 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Thu, 14 May 2009 17:06:18 +0200 Subject: Added new Map attribute - emptyIsNone If the emptyIsNone attribute is set to "1", the Python result will be forced to Py_None if the referenced XML value is empty. When checking if the value is empty, the XML value is right trimmed to remove trailing spaces. Only spaces are are removed. --- src/xmlpythonizer.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/xmlpythonizer.h') diff --git a/src/xmlpythonizer.h b/src/xmlpythonizer.h index d6fa54c..f0efaee 100644 --- a/src/xmlpythonizer.h +++ b/src/xmlpythonizer.h @@ -41,6 +41,8 @@ typedef struct ptzMAP_s { // the rest of types, an XPath to XML data int fixed_list_size; // Only to be used on lists char *list_index ; // Only to be used on fixed lists + int emptyIsNone; // Only for ptzINT/ptzFLOAT values + // - if set to 1, empty input strings sets the result to Py_None struct ptzMAP_s *child; // Only used for type_value == pyDICT struct ptzMAP_s *next; // Pointer chain -- cgit