Package gchecky :: Module gxml :: Class Document
[hide private]
[frames] | no frames]

Class Document

source code

object --+    
         |    
      Node --+
             |
            Document
Known Subclasses:
model.abstract_notification_t, model.abstract_order_t, model.bye_t, model.checkout_redirect_t, model.checkout_shopping_cart_t, model.demo_failure_t, model.diagnosis_t, model.error_t, model.hello_t, model.merchant_calculation_callback_t, model.merchant_calculation_results_t, model.notification_acknowledgment_t, model.ok_t, model.request_received_t

A Node which could be stored as a standalone xml document. Every Document subclass has its own xml tag_name so that it could be automatically stored into/loaded from an XML document.

Nested Classes [hide private]
  __metaclass__
Keeps track of all the Document subclasses.
Instance Methods [hide private]
 
toxml(self, pretty=False)
Returns: A string for the XML document representing the Document instance.
source code
 
__str__(self)
str(x)
source code

Inherited from Node: __eq__, __init__, __neq__, read, write

Inherited from object: __delattr__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__

Class Methods [hide private]
 
fromxml(self, text)
Read the text (as an XML document) into a Document (or subclass) instance.
source code

Inherited from Node: fields, set_fields

Static Methods [hide private]

Inherited from Node: __new__

Class Variables [hide private]

Inherited from Node (private): _fields

Instance Variables [hide private]
  tag_name = 'unknown'
The document's unique xml tag name.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

toxml(self, pretty=False)

source code 
Returns:
A string for the XML document representing the Document instance.

__str__(self)
(Informal representation operator)

source code 
str(x)
Overrides: object.__str__
(inherited documentation)

fromxml(self, text)
Class Method

source code 
Read the text (as an XML document) into a Document (or subclass) instance.
Returns:
A fresh-new instance of a Document (of the right subclas determined by the xml document tag name).