| Home | Trees | Index | Help | 
|---|
| Package EaseXML :: Module Nodes :: Class ListNode | 
  | 
object--+ |Node--+ | ListNode
Single Typed List node
ListNode is used to represent a variable number of XMLObjects, all of the same type. Example:
class Apple(XMLObject):
    type =  StringAttribute()
    color = StringAttribute()
class AppleBag(XMLObject):
    apples = ListNode('Apple')
bag = AppleBag()
bag.apples.append(Apple(type='Blah',color='green'))
print bag.toXml(headers=0)
<AppleBag>
  <Apple type="Blah" color="green" />
  <!-- other apples can fit here :) -->
</AppleBag>
If optional flag set to False, the bag has to carry at least one apple.
| Method Summary | |
|---|---|
__init__(self,
          itemType,
          optional,
          main)
 | |
checkType(self,
          aList)
 | |
getValueFromDom(self,
          dom,
          attrName,
          **kw)
 | |
resetValue(self)
 | |
XML representation of the Node  | |
| Inherited from Node | |
 | |
 | |
 | |
 | |
 | |
 | |
 | |
 | |
 | |
 | |
 | |
 | |
 | |
 | |
 | |
 | |
 | |
 | |
 | |
 | |
| Inherited from object | |
x.__delattr__('name') <==> del x.name  | |
x.__getattribute__('name') <==> x.name  | |
x.__hash__() <==> hash(x)  | |
T.__new__(S, ...) -> a new object with type S, a subtype of T  | |
helper for pickle  | |
helper for pickle  | |
x.__repr__() <==> repr(x)  | |
x.__setattr__('name', value) <==> x.name = value  | |
x.__str__() <==> str(x)  | |
| Method Details | 
|---|
  xmlrepr(self, parentInstance=None)XML representation of the Node Returns a string representing the Node as XML data. 
  | 
| Home | Trees | Index | Help | 
|---|
| Generated by Epydoc 2.1 on Sun Dec 12 17:20:24 2004 | http://epydoc.sf.net |