Configurator
Public Member Functions | Static Public Member Functions | List of all members
data_structures.XML_Check Class Reference

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
 

Detailed Description

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.

Constructor & Destructor Documentation

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. 

Member Function Documentation

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*. 
def data_structures.XML_Check.tags_initialize ( )
static
Initialize *self* to contain *name* and insert into *tags*. 

Member Data Documentation

data_structures.XML_Check.element_attributes element.attrib
static
Check *element* to see if it has valid attributes as
specified by *self*. 
list data_structures.XML_Check.xml_check tags[element.tag]
static
Check *element* for consistency using the *XML_Check* objects
in the *tags* dictionary. 

The documentation for this class was generated from the following file: