home
to by nando.quintana
function ajax(url,callback) {
try {
req = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {to by mikel
__doc__ = ''' MT TXT 2 Bitakora XML '''
FILENAME = 'migration_ueu365.txt'
POST_DELIMITER = '--------\n'
BODY_DELIMITER = '-----\n'
from StringIO import StringIOto by anonymous
function xml2array($object) {
$return = NULL;
if(is_array($object)) {
foreach($object as $key => $value) $return[$key] = xml2array($value);
} else {to by garaolaza
// When XML processing with JavaScript, sometimes void XML elements give strange answers about them
// I needed to check if the element was void, just like <item/>
if (somewhere.getElementsByTagName('item')[0].childNodes.length) { dothis(); }
to by nando.quintana
<option value="this_value" tal:attributes="selected python:test(my_value=='this_value','selected',)">this value</option>
to by garaolaza
from lxml import etree
coords = etree.parse("/path/to/your/xml/file").getroot()
coords_list = []
for coord in coords:
this = {}to by nando.quintana
# recibe un tag y busca el texto que hay entre el <tag> y el </tag>
def pieceoftext(content, tag, start_point=0):
start_tag = '<'+tag+'>'
end_tag = '</'+tag+'>'
start_point = content.find(start_tag,start_point)to by nando.quintana
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:zcml="http://namespaces.zope.org/zcml"
i18n_domain="zope"
>to by jonbaine
import sys
import xml.sax
if len(sys.argv) < 2 :
print 'USAGE: '+sys.argv[0]+' <nombre_de_archivo_xml>'
quit()to by nando.quintana
<configure xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser"
xmlns:xmlrpc="http://namespaces.zope.org/xmlrpc"
xmlns:i18n="http://namespaces.zope.org/i18n"
i18n_domain="kelpi" >