basictypes.xmlgenerator
index
p:\properties\basictypes\xmlgenerator.py

 
Modules
       
locale
xml.sax.saxutils

 
Classes
       
XMLGenerator(ContentHandler)
Generator
Store

 
class Generator(XMLGenerator)
    Friendly generator for XML code
 
 
Method resolution order:
Generator
XMLGenerator
ContentHandler

Methods defined here:
__init__(self, out=None, encoding='utf-8')
Initialise the generator
 
Just overrides the default encoding of the base-class
startElement(self, name, attributes=None)
Start a new element with given attributes

Methods inherited from XMLGenerator:
characters(self, content)
endElement(self, name)
endElementNS(self, name, qname)
endPrefixMapping(self, prefix)
ignorableWhitespace(self, content)
processingInstruction(self, target, data)
startDocument(self)
startElementNS(self, name, qname, attrs)
startPrefixMapping(self, prefix, uri)

Methods inherited from ContentHandler:
endDocument(self)
Receive notification of the end of a document.
 
The SAX parser will invoke this method only once, and it will
be the last method invoked during the parse. The parser shall
not invoke this method until it has either abandoned parsing
(because of an unrecoverable error) or reached the end of
input.
setDocumentLocator(self, locator)
Called by the parser to give the application a locator for
locating the origin of document events.
 
SAX parsers are strongly encouraged (though not absolutely
required) to supply a locator: if it does so, it must supply
the locator to the application by invoking this method before
invoking any of the other methods in the DocumentHandler
interface.
 
The locator allows the application to determine the end
position of any document-related event, even if the parser is
not reporting an error. Typically, the application will use
this information for reporting its own errors (such as
character content that does not match an application's
business rules). The information returned by the locator is
probably not sufficient for use with a search engine.
 
Note that the locator will return correct information only
during the invocation of the events in this interface. The
application should not attempt to use it at any other time.
skippedEntity(self, name)
Receive notification of a skipped entity.
 
The Parser will invoke this method once for each entity
skipped. Non-validating processors may skip entities if they
have not seen the declarations (because, for example, the
entity was declared in an external DTD subset). All processors
may skip external entities, depending on the values of the
http://xml.org/sax/features/external-general-entities and the
http://xml.org/sax/features/external-parameter-entities
properties.

 
class Store(Generator)
    Store a set of objects to an XML representation
 
 
Method resolution order:
Store
Generator
XMLGenerator
ContentHandler

Methods defined here:
__init__(self, *arguments, **named)
Initialise the store
classToElementName(self, classObject)
Get the element name for a given object
encodeInAttributes(self, property, client)
Determine whether to encode this property as an element attribute
handleObject(self, object)
Produce code for a single object

Methods inherited from Generator:
startElement(self, name, attributes=None)
Start a new element with given attributes

Methods inherited from XMLGenerator:
characters(self, content)
endElement(self, name)
endElementNS(self, name, qname)
endPrefixMapping(self, prefix)
ignorableWhitespace(self, content)
processingInstruction(self, target, data)
startDocument(self)
startElementNS(self, name, qname, attrs)
startPrefixMapping(self, prefix, uri)

Methods inherited from ContentHandler:
endDocument(self)
Receive notification of the end of a document.
 
The SAX parser will invoke this method only once, and it will
be the last method invoked during the parse. The parser shall
not invoke this method until it has either abandoned parsing
(because of an unrecoverable error) or reached the end of
input.
setDocumentLocator(self, locator)
Called by the parser to give the application a locator for
locating the origin of document events.
 
SAX parsers are strongly encouraged (though not absolutely
required) to supply a locator: if it does so, it must supply
the locator to the application by invoking this method before
invoking any of the other methods in the DocumentHandler
interface.
 
The locator allows the application to determine the end
position of any document-related event, even if the parser is
not reporting an error. Typically, the application will use
this information for reporting its own errors (such as
character content that does not match an application's
business rules). The information returned by the locator is
probably not sufficient for use with a search engine.
 
Note that the locator will return correct information only
during the invocation of the events in this interface. The
application should not attempt to use it at any other time.
skippedEntity(self, name)
Receive notification of a skipped entity.
 
The Parser will invoke this method once for each entity
skipped. Non-validating processors may skip entities if they
have not seen the declarations (because, for example, the
entity was declared in an external DTD subset). All processors
may skip external entities, depending on the values of the
http://xml.org/sax/features/external-general-entities and the
http://xml.org/sax/features/external-parameter-entities
properties.

 
Data
        __file__ = r'p:\properties\basictypes\xmlgenerator.pyc'
__name__ = 'basictypes.xmlgenerator'
defaultEncoding = 'cp1252'