Website hosting service by Active-Venture.com
  

 Back to Index


13.12.4 InputSource Objects

 
setPublicId( id)
Sets the public identifier of this InputSource.
 
getPublicId( )
Returns the public identifier of this InputSource.
 
setSystemId( id)
Sets the system identifier of this InputSource.
 
getSystemId( )
Returns the system identifier of this InputSource.
 
setEncoding( encoding)
Sets the character encoding of this InputSource.

The encoding must be a string acceptable for an XML encoding declaration (see section 4.3.3 of the XML recommendation).

The encoding attribute of the InputSource is ignored if the InputSource also contains a character stream.

 
getEncoding( )
Get the character encoding of this InputSource.
 
setByteStream( bytefile)
Set the byte stream (a Python file-like object which does not perform byte-to-character conversion) for this input source.

The SAX parser will ignore this if there is also a character stream specified, but it will use a byte stream in preference to opening a URI connection itself.

If the application knows the character encoding of the byte stream, it should set it with the setEncoding method.

 
getByteStream( )
Get the byte stream for this input source.

The getEncoding method will return the character encoding for this byte stream, or None if unknown.

 
setCharacterStream( charfile)
Set the character stream for this input source. (The stream must be a Python 1.6 Unicode-wrapped file-like that performs conversion to Unicode strings.)

If there is a character stream specified, the SAX parser will ignore any byte stream and will not attempt to open a URI connection to the system identifier.

 
getCharacterStream( )
Get the character stream for this input source.

  

 

2002-2004 Active-Venture.com Webhosting Service

 

Disclaimer: This documentation is provided only for the benefits of our hosting customers.
For authoritative source of the documentation, please refer to http://python.org/doc/

 

Cheap domain registration : Buy domain name and enjoy comprehensive free services   Cheap domain registration : Buy domain name or register domain, including free domain hosting services