Пример #1
0
 def mavgen_validate(fname, schema, errorLimitNumber):
     """Uses minixsv to validate an XML file with a given XSD schema file. We define mavgen_validate
        here because it relies on the XML libs that were loaded in mavgen(), so it can't be called standalone"""
     # use default values of minixsv, location of the schema file must be specified in the XML file
     domTreeWrapper = pyxsval.parseAndValidate(fname,
                                               xsdFile=schema,
                                               errorLimit=errorLimitNumber)
Пример #2
0
def mavgen_validate(fname, schema, errorLimitNumber) :
    """Uses minixsv to validate an XML file with a given XSD schema file."""
    # use default values of minixsv, location of the schema file must be specified in the XML file
    domTreeWrapper = pyxsval.parseAndValidate(fname, xsdFile=schema, errorLimit=errorLimitNumber)
            
    # domTree is a minidom document object
    domTree = domTreeWrapper.getTree()
Пример #3
0
def mavgen_validate(fname, schema, errorLimitNumber) :
    """Uses minixsv to validate an XML file with a given XSD schema file."""
    # use default values of minixsv, location of the schema file must be specified in the XML file
    domTreeWrapper = pyxsval.parseAndValidate(fname, xsdFile=schema, errorLimit=errorLimitNumber)
            
    # domTree is a minidom document object
    domTree = domTreeWrapper.getTree()
Пример #4
0
 def pprz_validate(fname, schema, errorLimitNumber) :
     """Uses minixsv to validate an XML file with a given XSD schema file. We define pprz_validate
        here because it relies on the XML libs that were loaded in gen_messages(), so it can't be called standalone"""
     # use default values of minixsv, location of the schema file must be specified in the XML file
     try:
         domTreeWrapper = pyxsval.parseAndValidate(fname, xsdFile=schema, errorLimit=errorLimitNumber)
     except pyxsval.XsvalError, errstr:
         print(errstr)
         return 1
Пример #5
0
 def mavgen_validate(fname, schema, errorLimitNumber) :
     """Uses minixsv to validate an XML file with a given XSD schema file. We define mavgen_validate
        here because it relies on the XML libs that were loaded in mavgen(), so it can't be called standalone"""
     # use default values of minixsv, location of the schema file must be specified in the XML file
     domTreeWrapper = pyxsval.parseAndValidate(fname, xsdFile=schema, errorLimit=errorLimitNumber)