Skip to content

Instantly share code, notes, and snippets.

View varadig's full-sized avatar
🏠
Working from home

Gabor Varadi varadig

🏠
Working from home
View GitHub Profile
@joac
joac / cdata_element_tree.py
Last active February 17, 2021 18:50
Monkey Patching Element Tree To support CDATA
import xml.etree.ElementTree as ET
CDATA_KEY = "__CDATA__" #cdata tag name for sustitution
def monkey_patch():
"""Monkey Patch ElementTree, to support CDATA"""
_serialize_xml = ET._serialize_xml
def _serialize_xml_cdata(write, elem, encoding, qnames, namespaces):
tag = elem.tag
@rjattrill
rjattrill / TaskTemplateDocumentSend.mxml
Last active November 14, 2019 11:25
Bind a Flex component to two conditions using && in MXML
<s:Button id="sendBtn" label="Send" click="sendBtn_clickHandler(event)"
enabled="{!model.documentSending &amp;&amp; model.documentCreated}"/>