Package gavo :: Package base :: Module activetags :: Class Prune
[frames] | no frames]

Class Prune

source code

                      object --+    
                               |    
                       ActiveTag --+
                                   |
              object --+           |
                       |           |
 structure.StructureBase --+       |
                           |       |
              object --+   |       |
                       |   |       |
           common.Parser --+       |
                           |       |
structure.ParseableStructure --+   |
                               |   |
             structure.Structure --+
                                   |
                                  Prune

An active tag that lets you selectively delete children of the current object.

You give it regular expression-valued attributes; on the replay of the stream, matching items and their children will not be replayed.

If you give more than one attribute, the result will be a conjunction of the specified conditions.

This only works if the items to be matched are true XML attributes (i.e., not written as children).

Nested Classes

Inherited from structure.StructureBase: __metaclass__

Instance Methods
 
__init__(self, parent, **kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
value_(self, ctx, name, value) source code
 
end_(self, ctx, name, value) source code

Inherited from structure.Structure: __provides__, callCompletedCallbacks, completeElement, finishElement, onElementComplete, validate

Inherited from structure.ParseableStructure: feed, feedFrom, feedObject, getAttribute, iterEvents, start_

Inherited from structure.StructureBase: __providedBy__, adopt, breakCircles, change, copy, getAttributes, getCopyableAttributes, getSourcePosition, iterChildren, setPosition

Inherited from common.Parser: feedEvent

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods

Inherited from structure.StructureBase: fromStructure

Class Variables
  name_ = 'PRUNE'
hash(x)

Inherited from structure.Structure: __implemented__

Inherited from structure.StructureBase: attrSeq, completedCallbacks, managedAttrs

Properties

Inherited from object: __class__

Method Details

__init__(self, parent, **kwargs)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

value_(self, ctx, name, value)

source code 
Overrides: structure.ParseableStructure.value_

end_(self, ctx, name, value)

source code 
Overrides: structure.ParseableStructure.end_