opc.types module#
- class opc.types.Types(parent)[source]#
Class representing the “[Content_Types].xml” file in the
Package. Inherits XmlBase and Base classes- add_default(part)[source]#
Adds the content type and extension of the part to the xml
- Parameters:
part –
Partobject
- add_override(part)[source]#
Add the uri_str and type of the part to the xml
- Parameters:
part – part object
- get_type(uri_str)[source]#
Returns the type of given uri_str. First Override elements in xml are checked for match then Default elements are checked
- Parameters:
uri_str – string value of the part’s uri
- Returns:
string value of the type of the given uri_str
- remove_type(uri_str)[source]#
Removes the type for given uri_str. If uri_str presents in Override elements of xml, that Override element would be removed. Otherwise Default element would be removed having the same extension as uri_str.
- Parameters:
uri_str – string value of the part’s uri
- zipname = '[Content_Types].xml'#