How to use the nyoka.PMML44.xmlbehavior.xml_behavior.factory function in nyoka

To help you get started, we’ve selected a few nyoka examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nyoka-pmml / nyoka / nyoka / PMML44 / xmlbehavior.py View on Github external
def parseLiteral(inFileName):
    doc = minidom.parse(inFileName)
    rootNode = doc.childNodes[0]
    rootObj = xml_behavior.factory()
    rootObj.build(rootNode)
    # Enable Python to collect the space used by the DOM.
    doc = None
    sys.stdout.write('from xmlbehavior import *\n\n')
    sys.stdout.write('rootObj = xml_behavior(\n')
    rootObj.exportLiteral(sys.stdout, 0)
    sys.stdout.write(')\n')
    return rootObj
github nyoka-pmml / nyoka / nyoka / PMML44 / xmlbehavior.py View on Github external
def parse(inFileName):
    doc = minidom.parse(inFileName)
    rootNode = doc.childNodes[0]
    rootObj = xml_behavior.factory()
    rootObj.build(rootNode)
    # Enable Python to collect the space used by the DOM.
    doc = None
    sys.stdout.write('\n')
    rootObj.export(sys.stdout, 0)
    return rootObj
github nyoka-pmml / nyoka / nyoka / PMML44 / xmlbehavior.py View on Github external
def parseString(inString):
    doc = minidom.parseString(inString)
    rootNode = doc.childNodes[0]
    rootObj = xml_behavior.factory()
    rootObj.build(rootNode)
    # Enable Python to collect the space used by the DOM.
    doc = None
    sys.stdout.write('\n')
    rootObj.export(sys.stdout, 0)
    return rootObj