Aspose.HTML FOSS for Python

API reference for Aspose.Html FOSS for Python v0.1.0. 243 public types organized by module.

Core API

ClassDescription
HTMLDocumentTop-level entry point for parsing HTML into a Document tree.

Css

ClassDescription
AttributeSelectorMatches elements by attribute presence or value.
ClassSelectorMatches elements whose class_list contains class_name: .foo.
ComplexNotPseudoClassMatches elements that do NOT match any selector in the argument list.
ComplexSelectorA chain of CompoundSelectors joined by Combinators.
CompoundSelectorA sequence of simple selectors that all apply to the same element.
HasPseudoClassMatches elements that have at least one relative match in their subtree.
IsPseudoClassMatches elements that match any selector in a forgiving selector list.
NthArgumentParsed An+B argument for :nth-child and related pseudo-classes.
NthFilteredChildPseudoClassMatches elements at An+B position among siblings filtered by a selector.
PseudoClassSelectorA pseudo-class selector.
SelectorListThe root AST node.
TypeSelectorMatches elements by tag name: div.
UniversalSelectorMatches any element: *.
WherePseudoClassIdentical matching semantics to IsPseudoClass; always contributes 0 specificity.

Enumerations

EnumerationDescription
AttributeOperatorAttribute selector operator types (CSS Selectors Level 3).
CombinatorSelector combinator types (CSS Selectors Level 3).

Cssom

ClassDescription
CSSNamespace class for CSS static utilities (CSS Conditional Rules §6).
CSSCounterStyleRuleA @counter-style rule (CSS Counter Styles Level 3 §3, CSSOM §5.4 type 11).
CSSDeclarationBlockA small CSSStyleDeclaration-compatible declaration container.
CSSFontFaceRuleA @font-face rule holding font descriptor declarations (CSS Fonts §4.4).
CSSImportRuleAn @import statement rule (CSSOM §6.7).
CSSKeyframeRuleA single keyframe descriptor within a @keyframes rule (CSSOM Animations §7).
CSSKeyframesRuleA @keyframes rule containing animation keyframe descriptors (CSSOM Animations §7).
CSSLayerBlockRuleA CSS @layer block rule assigning child rules to a named cascade layer.
CSSLayerStatementRuleA CSS @layer statement rule declaring cascade layer order.
CSSMediaRuleMedia rule scaffold for nested style rules.
CSSNamespaceRuleA @namespace rule (CSSOM §6.6, type 10).
CSSPageRuleCSS @page rule (CSSOM §6.4).
CSSPropertyRuleCSS @property rule stub (CSS Properties and Values API §3).
CSSRuleBase class for CSSOM rules.
CSSRuleListOrdered, live CSS rule collection.
CSSStyleRuleStyle rule (selector { declarations }).
CSSStyleSheetMinimal CSSOM stylesheet object (CSSOM §6.4).
CSSSupportsRuleA @supports rule with a condition and nested style rules (CSS Conditional Rules §2).

Dom

ClassDescription
AbortControllerControls cancellation of operations via an :class:AbortSignal.
AbortSignalRepresents the signal half of an AbortController pair.
AbstractRangeRead-only boundary-point contract shared by range-family APIs.
AttrAn attribute attached to an Element.
BarPropRepresents a browser toolbar object (WHATWG HTML §7.7.3).
BroadcastChannelDeterministic same-runtime BroadcastChannel fan-out delivery.
BrowsingContextInternal owner of navigation lifecycle/document state.
CDATASectionA CDATA section node (extends Text per WHATWG DOM Standard).
CSSStyleDeclarationA live view of an element’s inline style attribute.
CharacterDataAbstract base for Text, Comment, CDATASection, and ProcessingInstruction.
CommentAn HTML comment node.
ComputedStyleDeclarationRead-only resolved style declarations for an element.
ConsoleClass with 6 methods.
CryptoMinimal stub for the Crypto interface (W3C Web Crypto API §10.1).
CustomElementRegistryClass with 6 methods.
CustomEventAn Event carrying an arbitrary detail payload.
DOMConfigurationBaseline DOMConfiguration compatibility surface.
DOMExceptionBase for all DOM exceptions.
DOMImplementationLegacy DOMImplementation compatibility surface.
DOMParserParse markup strings into DOM documents.
DOMRectAn axis-aligned bounding rectangle (CSSOM View §7.1).
DOMRectListAn immutable sequence of :class:DOMRect objects (CSSOM View §7.2).
DOMStringMapA live dict-like view of an element’s data-* custom attributes.
DOMTokenListA live, mutable set of space-separated tokens backed by an element attribute.
DataCloneErrorRaised when a value cannot be serialized by the structured clone algorithm.
DocumentThe root of a DOM tree.
DocumentFragmentA lightweight container for a sub-tree.
DocumentPositionNamed constants for the bitmask returned by Node.compare_document_position.
DocumentTypeA document type declaration node (````).
ElementAn HTML or XML element node.
ErrorEventScript error event (WHATWG HTML §8.1.3.6).
EventA DOM event object per WHATWG DOM §2.2.
EventTargetBase class for objects that can receive DOM events.
FocusEventFocus transition event (WHATWG UI Events §5.4).
FormDataSnapshot collection of form control name/value pairs.
HTMLAddressElementHTML ```` element.
HTMLAnchorElementHTML ```` anchor element.
HTMLAreaElementHTML ```` image-map hyperlink area.
HTMLArticleElementHTML ```` element.
HTMLAsideElementHTML ```` element.
HTMLAudioElementHTML ```` element.
HTMLBRElementHTML ```` line-break element (structural subclass).
HTMLBaseElementHTML ```` element.
HTMLBodyElementHTML ```` element (structural subclass).
HTMLButtonElementHTML ```` element.
HTMLCanvasElementHTML ```` element.
HTMLCollectionA live, ordered collection of Element-type children only.
HTMLDListElementHTML ```` definition list element.
HTMLDataElementHTML ```` element.
HTMLDataListElementHTML ```` element providing autocomplete suggestions.
HTMLDetailsElementHTML ```` disclosure widget element.
HTMLDialogElementHTML ```` modal/non-modal dialog element.
HTMLDivElementHTML ```` block container element.
HTMLElementBase class for all HTML-namespace element types.
HTMLEmbedElementHTML ```` element.
HTMLFieldSetElementHTML ```` element for grouping form controls.
HTMLFigCaptionElementHTML ```` element.
HTMLFigureElementHTML ```` element.
HTMLFooterElementHTML ```` element.
HTMLFormElementHTML ```` element.
HTMLHRElementHTML ```` thematic-break element (structural subclass).
HTMLHeadElementHTML ```` element (structural subclass).
HTMLHeaderElementHTML ```` element.
HTMLHeadingElementHTML heading element — covers through.
HTMLHtmlElementHTML ```` document element (structural subclass).
HTMLIFrameElementHTML ```` element.
HTMLImageElementHTML ```` image element.
HTMLInputElementHTML ```` form control element.
HTMLLIElementHTML ```` list item element.
HTMLLabelElementHTML ```` element.
HTMLLegendElementHTML ```` element (WHATWG §4.10.4).
HTMLLinkElementHTML ```` element.
HTMLMainElementHTML ```` element.
HTMLMapElementHTML ```` element.
HTMLMarkElementHTML ```` element.
HTMLMediaElementBase class for HTML media elements (/).
HTMLMenuElementRepresents an HTML ```` element.
HTMLMetaElementHTML ```` element.
HTMLMeterElementHTML ```` element for displaying a scalar value in a range.
HTMLModElementHTML / modification element.
HTMLNavElementHTML ```` element.
HTMLNoScriptElementHTML ```` element.
HTMLOListElementHTML ```` ordered list element.
HTMLObjectElementHTML ```` element.
HTMLOptGroupElementHTML ```` element for grouping options in a select list.
HTMLOptionElementHTML ```` element representing a choice in a select list.
HTMLOptionsCollectionLive collection of elements for a.
HTMLOutputElementHTML ```` element for displaying calculation results.
HTMLParagraphElementHTML ```` paragraph element.
HTMLParamElementHTML ```` element.
HTMLPictureElementHTML ```` element (structural subclass).
HTMLPreElementHTML ```` preformatted text element (structural subclass).
HTMLProgressElementHTML ```` element showing task completion.
HTMLQuoteElementHTML / quote element.
HTMLRubyElementHTML //```` element.
HTMLScriptElementHTML ```` element.
HTMLSectionElementHTML ```` element.
HTMLSelectElementHTML ```` element.
HTMLSmallElementHTML ```` element.
HTMLSourceElementHTML ```` element.
HTMLSpanElementHTML ```` inline container element.
HTMLStyleElementHTML ```` element.
HTMLSummaryElementRepresents an HTML ```` element.
HTMLTableCaptionElementHTML ```` element.
HTMLTableCellElementHTML or element.
HTMLTableColElementHTML or element.
HTMLTableElementHTML ```` element.
HTMLTableRowElementHTML ```` element.
HTMLTableSectionElementHTML , , or ```` element.
HTMLTemplateElementHTML ```` element holding inert content.
HTMLTextAreaElementHTML ```` multi-line text input element.
HTMLTimeElementHTML ```` element.
HTMLTitleElementHTML ```` element.
HTMLTrackElementHTML ```` element.
HTMLUListElementHTML ```` unordered list element.
HTMLUnknownElementHTML unknown element interface (export-only, not registry-dispatched).
HTMLVideoElementHTML ```` element.
HTMLWBRElementHTML ```` element.
HashChangeEventSame-document fragment navigation event.
HierarchyRequestErrorRaised when the tree hierarchy is violated.
HistoryIn-memory session history for a Window.
InUseAttributeErrorRaised when an Attr is already in use by another element.
IndexSizeErrorRaised when an index or size is out of range.
InputEventText-input event (WHATWG Input Events Level 2 / WHATWG UI Events §5.6).
IntersectionObserverHeadless IntersectionObserver API-shape stub.
IntersectionObserverEntryHeadless IntersectionObserver entry stub.
InvalidCharacterErrorRaised when an invalid character is used.
InvalidStateErrorRaised when an operation is performed in an invalid state.
KeyboardEventKeyboard event (WHATWG UI Events §5.3).
LocationClass with 4 methods and 8 properties.
MediaQueryListMediaQueryList returned by :meth:Window.match_media.
MessageChannelPair of linked :class:MessagePort endpoints.
MessagePortDeterministic same-runtime MessagePort queue baseline.
MouseEventMouse or pointer event (WHATWG UI Events §5.2).
MutationObserverObserve DOM mutations on a target node.
MutationRecordOne DOM mutation notification record.
NamedNodeMapAn ordered map of Attr objects keyed by attribute name.
NavigatorClass with 7 methods and 40 properties.
NoModificationAllowedErrorRaised when a node cannot be modified in its current context.
NodeAbstract base class for all WHATWG DOM nodes.
NodeFilterConstants for TreeWalker and NodeIterator filtering.
NodeIteratorFlat, stateful iteration over DOM nodes matching a filter.
NodeListA live, ordered collection of Node objects.
NodeTypeInteger constants for the node_type property of DOM nodes.
NotFoundErrorRaised when a node is not found in the expected location.
NotSupportedErrorRaised when an operation is not supported.
ParseErrorA parse error recorded during tree construction.
PerformanceMinimal stub for the Performance interface.
PerformanceEntryA single performance timeline entry.
PerformanceTimingLegacy Navigation Timing Level 1 interface stub.
PopStateEventHistory traversal event carrying the active entry state.
ProcessingInstructionA processing instruction node (e.g.
RangeA contiguous portion of a document tree (WHATWG DOM §5).
ResizeObserverHeadless ResizeObserver API-shape stub.
ResizeObserverEntryHeadless ResizeObserver entry stub.
ScreenBrowser screen geometry — all values are stubs (server-side context).
SecurityErrorRaised when an operation is blocked for security reasons.
SelectionDocument-scoped selection with single-range semantics.
StaticRangeImmutable boundary-point range initialized from an init object.
StorageKey-value store implementing the WHATWG HTML §12 Storage interface.
StyleSheetListLive ordered stylesheet collection.
SubtleCryptoStub for the SubtleCrypto interface (W3C Web Crypto API §10).
SyntaxErrorRaised when a string does not match the expected pattern or grammar.
TextA text node.
TreeWalkerCursor-style DOM traversal bounded to a root subtree.
UIEventBase class for user-interface events (WHATWG UI Events §5.1).
ValidityStateConstraint-validation flags for a form control.
VisualViewportCSSOM View §9 VisualViewport — all values are headless stubs.
WindowPer-document window object with EventTarget behavior.
WindowEventLoopInternal task-source scheduler used by Window/BrowsingContext.
WrongDocumentErrorRaised when a node belongs to a different document.
XMLSerializerSerialise DOM nodes to strings.

Encoding

ClassDescription
EncodingDetectionResultResult of encoding detection and decoding for an HTML byte stream.
UnsupportedEncodingErrorRaised when the detected encoding has no Python codec.

Js

ClassDescription
JSContextA JavaScript execution context backed by QuickJS, pre-wired to a DOM.
JSEvaluationErrorRaised when a JavaScript expression throws an exception.
ModuleLoadPolicyConstants governing how a JSContext resolves module specifiers.
ModuleNotFoundErrorRaised when a module specifier has no registered source.
ModuleRegistryMaps module specifiers to ES module source strings.

Layout

ClassDescription
BlockFragmentGeometry fragment for a block-level box.
BoxNodeSingle box-tree node produced by :func:build_box_tree.
BoxRootRoot wrapper returned by :func:build_box_tree.
BreakHintsClass with 5 properties.
ComputedStyleImmutable layout-facing snapshot of an element’s resolved style.
DisplayResolved display triple per CSS Display L3 §2.
EdgeSizesLogical edge sizes in CSS px units.
FragmentRootRoot wrapper for block-layout fragment output.
InlineTextFragmentPositioned inline text fragment for a single shaped run.
LineFragmentSingle inline formatting context line box.
PageFragmentSingle paginated fragmentainer (page box) with ordered content.
PageMarginBoxesPlaceholder page-margin-box container for later paint stages.
ShapedRunShaped text-run payload with deterministic metrics.

Tokenizer

ClassDescription
CharacterTokenA character token carrying one or more Unicode characters.
CommentTokenA comment token, e.g.
DoctypeTokenA DOCTYPE token emitted by the WHATWG tokeniser.
EndTagTokenAn end tag token, e.g.
EofTokenAn end-of-file token.
StartTagTokenA start tag token, e.g.
TokenizerWHATWG HTML tokeniser (§13.2.5).

Enumerations

EnumerationDescription
TokenizerStateAll tokeniser states defined in WHATWG HTML Living Standard §13.2.5.

Tree

ClassDescription
ActiveFormattingListThe list of active formatting elements as defined in §13.2.4.3.
StackOfOpenElementsThe stack of open elements as defined in §13.2.4.2.
TemplateInsertionModeStackThe template insertion mode stack per §13.2.4.1.
TreeBuilderDrives the WHATWG tree construction algorithm.

Enumerations

EnumerationDescription
InsertionModeThe 23 WHATWG insertion modes (§13.2.6).

Url

ClassDescription
URLClass with 3 methods and 12 properties.
URLParseErrorRaised when a string cannot be parsed as a URL.
URLSearchParamsOrdered query-string pairs with duplicate-key support.

See Also