Module xmlsec :: Class NodeSet
[frames | no frames]

Class NodeSet


Method Summary
  __init__(self, doc, nodes, type, _obj)
Creates new nodes set.
  __getattr__(self, name)
  __setattr__(self, name, value)
  add(self, newNSet, op)
Adds newNSet to the nset using operation op.
  addList(self, newNSet, op)
Adds newNSet to the nset as child using operation op.
  contains(self, node, parent)
Checks whether the node is in the nodes set or not.
  debugDump(self, output)
Prints information about nset to the output.
  destroy(self)
Destroys the nodes set.
  docDestroy(self)
Instructs node set to destroy nodes parent doc when node set is destroyed.
  dumpTextNodes(self, out)
Dumps content of all the text nodes from nset to out.
  setWalk(self, walkFunc, data)
Calls the function walkFunc once per each node in the nodes set nset.

Method Details

__init__(self, doc=None, nodes=None, type=None, _obj=None)
(Constructor)

Creates new nodes set. Caller is responsible for freeing returned object
by calling destroy method.
doc     : the parent XML document.
nodes   : the list of nodes.
type    : the nodes set type.
Returns : a newly node set or None if an error occurs.

add(self, newNSet, op)

Adds newNSet to the nset using operation op.
newNSet : the new nodes set.
op      : the operation type.
Returns : the combined nodes set or None if an error occurs.

addList(self, newNSet, op)

Adds newNSet to the nset as child using operation op.
newNSet : the new nodes set.
op      : the operation type.
Returns : the combined nodes set or None if an error occurs.

contains(self, node, parent)

Checks whether the node is in the nodes set or not.
node    : the XML node to check.
parent  : the node parent node.
Returns : 1 if the node is in the nodes set nset, 0 if it is not and a
negative value if an error occurs.

debugDump(self, output)

Prints information about nset to the output.
output : the output file.

destroy(self)

Destroys the nodes set.

docDestroy(self)

Instructs node set to destroy nodes parent doc when node set is destroyed.

dumpTextNodes(self, out)

Dumps content of all the text nodes from nset to out.
out     : the output buffer.
Returns : 0 on success or a negative value otherwise.

setWalk(self, walkFunc, data)

Calls the function walkFunc once per each node in the nodes set nset.
If the walkFunc returns a negative value, then the walk procedure is
interrupted.
walkFunc : the callback functions.
data     : the application specific data passed to the walkFunc.
Returns  : 0 on success or a negative value if an error occurs.

Generated by Epydoc 2.0 on Mon Feb 9 01:09:33 2004 http://epydoc.sf.net