diff --git a/api/@ohos.util.d.ts b/api/@ohos.util.d.ts index a2e7914b17b8b81655bfa422998c568f20e634a3..88ec1e49e9e060a2a7ac1e31e92b975de8518f3a 100644 --- a/api/@ohos.util.d.ts +++ b/api/@ohos.util.d.ts @@ -416,10 +416,19 @@ declare namespace util { [Symbol.iterator](): IterableIterator<[K, V]>; } interface ScopeComparable { - /* The comparison function is used by the scope. */ + /** + * The comparison function is used by the scope. + * @since 8 + * @sysCap SystemCapability.CCRuntime + * @return Returns whether the current object is greater than or equal to the input object. + */ compareTo(other: ScopeComparable): boolean; } - + /** + * A type used to denote ScopeComparable or number. + * @since 8 + * @sysCap SystemCapability.CCRuntime + */ type ScopeType = ScopeComparable | number; class Scope{ diff --git a/api/@ohos.xml.d.ts b/api/@ohos.xml.d.ts index afe6be93c441289f973daf2c42f0a0a28ff4ee5e..8d55d7a9c7e3517629a1c56e174bf0325e02b537 100644 --- a/api/@ohos.xml.d.ts +++ b/api/@ohos.xml.d.ts @@ -117,90 +117,132 @@ declare namespace xml { enum EventType { /** * Start a document. + * @since 8 + * @sysCap SystemCapability.CCRuntime */ START_DOCUMENT, /** * End a document. + * @since 8 + * @sysCap SystemCapability.CCRuntime */ END_DOCUMENT, /** * Start a tag. + * @since 8 + * @sysCap SystemCapability.CCRuntime */ START_TAG, /** * End a tag. + * @since 8 + * @sysCap SystemCapability.CCRuntime */ END_TAG, /** * Character data. + * @since 8 + * @sysCap SystemCapability.CCRuntime */ TEXT, /** * A CDATA sections. + * @since 8 + * @sysCap SystemCapability.CCRuntime */ CDSECT, /** * An XML comment. + * @since 8 + * @sysCap SystemCapability.CCRuntime */ COMMENT, /** * An XML document type declaration. + * @since 8 + * @sysCap SystemCapability.CCRuntime */ DOCDECL, /** * An XML processing instruction declaration. + * @since 8 + * @sysCap SystemCapability.CCRuntime */ INSTRUCTION, /** * An entity reference. + * @since 8 + * @sysCap SystemCapability.CCRuntime */ ENTITY_REFERENCE, /** * a whitespace. + * @since 8 + * @sysCap SystemCapability.CCRuntime */ - WHITESPACE, + WHITESPACE } /** The current parse info. */ interface ParseInfo { /** * The current column number, starting from 1. + * @since 8 + * @sysCap SystemCapability.CCRuntime */ getColumnNumber(): number; /** * The current depth of the element. + * @since 8 + * @sysCap SystemCapability.CCRuntime */ getDepth(): number; /** - * The current column number, starting from 1. + * The current line number, starting from 1. + * @since 8 + * @sysCap SystemCapability.CCRuntime */ getLineNumber(): number; /** - * The current element name. + * The current element's name. + * @since 8 + * @sysCap SystemCapability.CCRuntime */ getName(): string; /** - * The current element's name. + * The current element's namespace. + * @since 8 + * @sysCap SystemCapability.CCRuntime */ getNamespace(): string; /** - * The current element's namespace. + * The current element's prefix. + * @since 8 + * @sysCap SystemCapability.CCRuntime */ getPrefix(): string; /** * The text content of the current event as String. + * @since 8 + * @sysCap SystemCapability.CCRuntime */ getText(): string; /** * Returns true if the current element is empty. + * @since 8 + * @sysCap SystemCapability.CCRuntime */ isEmptyElementTag(): boolean; /** * Checks whether the current TEXT event contains only whitespace characters. + * @since 8 + * @sysCap SystemCapability.CCRuntime */ isWhitespace(): boolean; /** * Returns the number of attributes of the current start tag. + * @since 8 + * @sysCap SystemCapability.CCRuntime */ getAttributeCount(): number; }