Configurator
|
A helper class to help check XML files for errors. More...
Public Member Functions | |
def | __init__ |
def | child_tag |
def | required_attribute |
def | optional_attribute |
def | attributes_check |
Static Public Member Functions | |
def | tags_initialize |
def | element_check |
A helper class to help check XML files for errors.
This class lists the allowed child tags and attributes for a given tag name.
This class is used to provide a data structure that is used to check XML file structure. It keeps track of allowable sub-tags, required attributes and optional attributes.
def data_structures.XML_Check.__init__ | ( | self, | |
name, | |||
has_text, | |||
tags | |||
) |
This class lists the allowed child tags and attributes for a given tag name.
def data_structures.XML_Check.attributes_check | ( | self, | |
element | |||
) |
Append *name* as an optional attribute for *self*.
def data_structures.XML_Check.optional_attribute | ( | self, | |
name | |||
) |
Append *name* as a requried attribute for *self*.
def data_structures.XML_Check.required_attribute | ( | self, | |
name | |||
) |
Append *name* as an allowed child tag for *self*.
|
static |
Initialize *self* to contain *name* and insert into *tags*.
|
static |
Check *element* to see if it has valid attributes as specified by *self*.
|
static |
Check *element* for consistency using the *XML_Check* objects in the *tags* dictionary.