Ignore:
Timestamp:
Jun 14, 2005, 2:22:52 PM (19 years ago)
Author:
Michael Brickenstein <bricken@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
9b973c144b1c3a7ddd2df88833b75055fc1688ae
Parents:
bb3e2b01b8b571e1ce0e1df85bcb71fb0ccb8e9d
Message:
*bricken: can do this all day


git-svn-id: file:///usr/local/Singular/svn/trunk@8362 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/openmathserver/xmlencodetest.py

    rbb3e2b0 rbfcf68  
    11from objects import *
    22from context import *
     3import arith1
    34context=Context()
    45context.push({})
    56i=OMint(22482489)
    6 print i.body
     7#print i.body
    78print i.XMLencode(context)
     9print context.XMLEncodeObject(i)
    810v=OMvar("x")
    911print v.XMLencode(context)
    10 print v.XMLattributes
     12x=v
     13y=OMvar("y")
     14a=OMapplication(OMsymbol("plus",arith1.content),[x,y,i])
     15print a.XMLencode(context)
     16print context.XMLEncodeObject(context.evaluate(a))
     17a1=OMapplication(OMsymbol("plus",arith1.content),[OMint(1),OMint(2)])
     18a2=OMapplication(OMsymbol("plus",arith1.content),[a1,OMint(2)])
     19a3=OMapplication(OMsymbol("plus",arith1.content),[a2,x])
     20context.addCDImplementation(arith1.implementation)
     21print "a3", context.XMLEncodeObject(context.evaluate(a3))
     22print "a2", context.XMLEncodeObject(context.evaluate(a2))
     23print "a1", context.XMLEncodeObject(context.evaluate(a1))
     24
     25f=OMfloat(1.23434)
     26print context.XMLEncodeObject(f)
     27#print v.XMLattributes
     28
Note: See TracChangeset for help on using the changeset viewer.