Functions | |
| def | text_from_string |
| def | create_document |
| def | readText |
| def | to_string |
| def | bool_from_string |
| def py::qo::xmlutil::bool_from_string | ( | data | ) |
| def py::qo::xmlutil::create_document | ( | root, | ||
ns = "qo", |
||||
nsurl = "http://qomics.inzenet.org/XML" | ||||
| ) |
| def py::qo::xmlutil::readText | ( | node | ) |
00035 : 00036 ret = "" 00037 e = node.firstChild 00038 while e is not None : 00039 if e.nodeType in [ xml.dom.Node.TEXT_NODE, xml.dom.Node.CDATA_SECTION_NODE ] : 00040 ret += e.nodeValue 00041 e = e.nextSibling 00042 return ret 00043 def to_string( data ) :
| def py::qo::xmlutil::text_from_string | ( | s | ) |
Returns a well-formed string for xml attribute
00022 : 00023 """ 00024 Returns a well-formed string for xml attribute 00025 """ 00026 return s.replace('"','"e;').replace('&','&') 00027 def create_document( root, ns="qo", nsurl="http://qomics.inzenet.org/XML" ) :
| def py::qo::xmlutil::to_string | ( | data | ) |
00044 : 00045 if data is None : 00046 return "" 00047 else : 00048 if isinstance(data, bool) : 00049 if data : 00050 return "1" 00051 else : 00052 return "0" 00053 return str(data) 00054 def bool_from_string( data ) :
1.5.3