Beispiel #1
0
def exampleEmptyString():
    s = """
	<value>
		<struct>
			<member>
				<name>blah</name>
			        <value><string/></value>
			</member>
			<member>
				<name>hello</name>
			        <value><string>blah de</string></value>
			</member>
		</struct>
	</value>
	"""
    print(xmlrpc.decode(s)[0])
Beispiel #2
0
def exampleAmper():
    e = xmlrpc.encode('&')
    print(e)
    print(xmlrpc.decode(e)[0])
Beispiel #3
0
def exampleAscii():
    print(xmlrpc.decode('<value><string>&#38;</string></value>'))
Beispiel #4
0
def exampleBase64():
    b = xmlrpc.base64('Hello, world!')
    print('base64 is', b)
    print('encoded base64 is', xmlrpc.encode(b))
    print('decoded base64 is', xmlrpc.decode(xmlrpc.encode(b)))
Beispiel #5
0
def exampleDate():
    d = xmlrpc.dateTime(1999, 6, 12, 4, 32, 34)
    print('date is', d)
    print('encoded date is', xmlrpc.encode(d))
    print('decoded date is', xmlrpc.decode(xmlrpc.encode(d)))
Beispiel #6
0
def exampleEncode():
    r = ['hum', 3242, 'de']
    print('object is', r)
    print('encoded is:\n', xmlrpc.encode(r))
    print('decoded is:', xmlrpc.decode(xmlrpc.encode(r)))