Module xmlobject :: Class XMLNode
[show private | hide private]
[frames | no frames]

Class XMLNode


This is the workhorse for the xml object interface

(If you're viewing the epydoc-generated HTML documentation, click the 'show private' link at the top right of this page to see all the methods)
Method Summary
  __init__(self, parent, node)
You shouldn't need to instantiate this directly
  __getattr__(self, attr)
Fetches an attribute or child node of this tag
  __getitem__(self, idx)
if given key is numeric, return the nth child, otherwise try to return the child tag (or list of child tags) having the key as the tag name
  __len__(self)
returns number of child nodes
  __repr__(self)
  __setattr__(self, attr, val)
Change the value of an attribute of this tag

Method Details

__init__(self, parent, node)
(Constructor)

You shouldn't need to instantiate this directly

__getattr__(self, attr)
(Qualification operator)

Fetches an attribute or child node of this tag

If it's an attribute, then returns the attribute value as a string.

If a child node, then:
  • if there is only one child node of that name, return it
  • if there is more than one child node of that name, return a list of child nodes of that tag name

__getitem__(self, idx)
(Indexing operator)

if given key is numeric, return the nth child, otherwise try to return the child tag (or list of child tags) having the key as the tag name

__len__(self)
(Length operator)

returns number of child nodes

__setattr__(self, attr, val)

Change the value of an attribute of this tag

Generated by Epydoc 2.1 on Sun Apr 16 17:53:17 2006 http://epydoc.sf.net