edxml package

edxml.EDXMLBase module

This module contains generic (base)classes used throughout the SDK.

exception edxml.EDXMLBase.EDXMLError(message)

Bases: Exception

Generic EDXML exception class

exception edxml.EDXMLBase.EDXMLProcessingInterrupted

Bases: Exception

Exception for signaling that EDXML processing was aborted

class edxml.EDXMLBase.EDXMLBase

Bases: object

Base class for most SDK subclasses


Raises EDXMLError.

Parameters:Message (str) – Error message

Prints a warning to sys.stderr.

Parameters:Message (str) – Warning message

Returns the number of warnings generated


Returns the number of errors generated

ValidateDataType(ObjectType, DataType)

Validate a data type.

  • ObjectType (str) – Name of the object type having specified data type
  • DataType (str) – EDXML data type

calls Error() when datatype is invalid.

ValidateObject(Value, ObjectTypeName, DataType, Regexp=None)

Validate an object value.

The Value argument can be a string, int, bool, Decimal, etc depending on the data type.

  • Value – Object value.
  • ObjectTypeName (str) – Object type.
  • DataType (str) – EDXML data type of object.
  • Regexp (str, optional) – Regular expression for checking Value.

calls Error() when value is invalid.

NormalizeObject(Value, DataType)

Normalize an object value to a unicode string

Prepares an object value for computing sticky hashes, by applying the normalization rules as outlined in the EDXML specification. It takes a string containing an object value as input and returns a normalized unicode string.

  • Value (str, unicode) – The input object value
  • DataType (str) – EDXML data type

unicode. The normalized object value

calls Error() when value is invalid.

edxml.EDXMLDefinitions module

edxml.EDXMLFilter module

edxml.EDXMLParser module

edxml.EDXMLWriter module