Skip to content

Runscript Parser

This module contains an XML-parser for run script specifications. It reads and converts a given specification and returns its representation in form of python classes.

Parser

A parser to parse xml runscript specifications.

__init__() -> None

Initializes the parser.

parse(file_name: str) -> Runscript

Parse a given runscript and return its representation in form of an instance of class Runscript.

Attributes:

Name Type Description
fileName str

a string holding a path to a xml file.

parse_file(file_name: str, schema_dir: str, schema_file: str) -> etree._ElementTree

Parse a given XML file and validate it against a given schema.

Attributes:

Name Type Description
file_name str

a string holding a path to a xml file.

schema_dir str

a string holding a path to the schema directory.

schema_file str

a string holding the name of the schema file.

validate_components(run: Runscript) -> None

Check runscript for the existence of all required components.