xml¶
The xml module provides a Python interface for the XML 1.1 and XML Information Set specifications. This Python interface enables the user to navigate the XML document tree and access information from any XML node including post-schema-validation infoset properties as described in the XML Schema specification.
Classes¶
xml.AttributeInformationItemxml.Catalogxml.CharDataInformationItemxml.CommentInformationItemxml.Documentxml.DocumentInformationItemxml.DocumentTypeDeclarationInformationItemxml.ElementInformationItemxml.Errorxml.ErrorLogxml.InformationItemxml.Instancexml.Jobxml.NSAttributeInformationItemxml.NotationInformationItemxml.Optionsxml.OptionsItemsxml.OptionsKeysxml.OptionsValuesxml.ProcessingInstructionInformationItemxml.QNamexml.SampleXMLGeneratorOptionsxml.UnexpandedEntityReferenceInformationItemxml.UnparsedEntityInformationItem
Enum Classes¶
-
class
xml.AssignSchemaOrDTD¶ Defines how a schema/DTD is assigned to the generated document.
-
AssignSchemaOrDTD.ASSIGNABSOLUTELY¶ With absolute path.
-
AssignSchemaOrDTD.ASSIGNRELATIVELY¶ With relative path.
-
AssignSchemaOrDTD.DONOTASSIGN¶ Don’t assign schema/dtd.
-
class
xml.ChoiceMode¶ Defines the branch to use if a choice is encountered.
-
ChoiceMode.ALLBRANCHES¶ All branches of choice
-
ChoiceMode.FIRSTBRANCH¶ First branch of choice
-
ChoiceMode.SHORTESTBRANCH¶ Branch with the smallest number of Elements
-
class
xml.EnumValues¶ Defines how manually added sample values are used.
-
EnumValues.CYCLETHROUGH¶ Cycle through choices.
-
EnumValues.FIRSTFIT¶ Use first choice.
-
EnumValues.RANDOMFIT¶ Randomize enum choice.
-
class
xml.ErrorSeverity¶ The
xml.ErrorSeverityenumeration represents the severity of a single error object.
-
ErrorSeverity.ERROR¶ The error object represents an error.
-
ErrorSeverity.INCONSISTENCY¶ The error object represents an inconsistency error.
-
ErrorSeverity.INFO¶ The error object represents a piece of additional information.
-
ErrorSeverity.OTHER¶ The meaning of the error object should be derived from the current context.
-
ErrorSeverity.WARNING¶ The error object represents a warning.
-
class
xml.SchemaSpecified¶ The
xml.SchemaSpecifiedenumeration provides values for the post-schema-validation infoset propertiesxml.AttributeInformationItem.schema_specifiedandxml.ElementInformationItem.schema_specified.
-
SchemaSpecified.INFOSET¶ The schema normalized value of this element or attribute originates from the instance.
-
SchemaSpecified.NONE¶ Schema valditiy for the element or attribute wasn’t assessed.
-
SchemaSpecified.SCHEMA¶ The schema normalized value of this element or attribute originates from a value constraint (default value) in the schema.
-
class
xml.ValidationAttempted¶ The
xml.ValidationAttemptedenumeration provides values for the post-schema-validation infoset propertiesxml.AttributeInformationItem.validation_attemptedandxml.ElementInformationItem.validation_attempted.
-
ValidationAttempted.FULL¶ The
xml.InformationItemand all its children and attributes were strictly assessed.
-
ValidationAttempted.NONE¶ Neither the
xml.InformationItemnor any of its children or attributes were strictly assessed.
-
ValidationAttempted.PARTIAL¶ The
xml.InformationItemor any of its children or attributes was strictly assessed, but not all.
-
class
xml.Validity¶ The
xml.Validityenumeration provides values for the post-schema-validation infoset propertiesxml.AttributeInformationItem.validityandxml.ElementInformationItem.validity.
-
Validity.INVALID¶ The
xml.ElementInformationItemorxml.AttributeInformationItemwas strictly assessed and it is invalid.
-
Validity.NOTKNOWN¶ Validity is not known. Most likely the
xml.ElementInformationItemorxml.AttributeInformationItemwas laxly assessed.
-
Validity.VALID¶ The
xml.ElementInformationItemorxml.AttributeInformationItemwas strictly assessed and it is valid.