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.AttributeInformationItem
xml.Catalog
xml.CharDataInformationItem
xml.CommentInformationItem
xml.Document
xml.DocumentInformationItem
xml.DocumentTypeDeclarationInformationItem
xml.ElementInformationItem
xml.Error
xml.ErrorLog
xml.InformationItem
xml.Instance
xml.Job
xml.NSAttributeInformationItem
xml.NotationInformationItem
xml.Options
xml.OptionsItems
xml.OptionsKeys
xml.OptionsValues
xml.ProcessingInstructionInformationItem
xml.QName
xml.SampleXMLGeneratorOptions
xml.UnexpandedEntityReferenceInformationItem
xml.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.ErrorSeverity
enumeration 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.SchemaSpecified
enumeration provides values for the post-schema-validation infoset propertiesxml.AttributeInformationItem.schema_specified
andxml.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.ValidationAttempted
enumeration provides values for the post-schema-validation infoset propertiesxml.AttributeInformationItem.validation_attempted
andxml.ElementInformationItem.validation_attempted
.
-
ValidationAttempted.
FULL
¶ The
xml.InformationItem
and all its children and attributes were strictly assessed.
-
ValidationAttempted.
NONE
¶ Neither the
xml.InformationItem
nor any of its children or attributes were strictly assessed.
-
ValidationAttempted.
PARTIAL
¶ The
xml.InformationItem
or any of its children or attributes was strictly assessed, but not all.
-
class
xml.
Validity
¶ The
xml.Validity
enumeration provides values for the post-schema-validation infoset propertiesxml.AttributeInformationItem.validity
andxml.ElementInformationItem.validity
.
-
Validity.
INVALID
¶ The
xml.ElementInformationItem
orxml.AttributeInformationItem
was strictly assessed and it is invalid.
-
Validity.
NOTKNOWN
¶ Validity is not known. Most likely the
xml.ElementInformationItem
orxml.AttributeInformationItem
was laxly assessed.
-
Validity.
VALID
¶ The
xml.ElementInformationItem
orxml.AttributeInformationItem
was strictly assessed and it is valid.